Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Side by Side Diff: third_party/boto/tests/mturk/reviewable_hits.doctest

Issue 698893003: Update checked in version of gsutil to version 4.6 (Closed) Base URL: http://dart.googlecode.com/svn/third_party/gsutil/
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 >>> import uuid 1 >>> import uuid
2 >>> import datetime 2 >>> import datetime
3 >>> from _init_environment import MTurkConnection, mturk_host 3 >>> from _init_environment import MTurkConnection, mturk_host
4 >>> from boto.mturk.question import Question, QuestionContent, AnswerSpecificati on, FreeTextAnswer 4 >>> from boto.mturk.question import Question, QuestionContent, AnswerSpecificati on, FreeTextAnswer
5 5
6 >>> conn = MTurkConnection(host=mturk_host) 6 >>> conn = MTurkConnection(host=mturk_host)
7 7
8 # create content for a question 8 # create content for a question
9 >>> qn_content = QuestionContent() 9 >>> qn_content = QuestionContent()
10 >>> qn_content.append_field('Title', 'Boto no hit type question content') 10 >>> qn_content.append_field('Title', 'Boto no hit type question content')
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 # this is a valid request 77 # this is a valid request
78 >>> assignments_rs.status 78 >>> assignments_rs.status
79 True 79 True
80 80
81 >>> int(assignments_rs.NumResults) >= 1 81 >>> int(assignments_rs.NumResults) >= 1
82 True 82 True
83 83
84 >>> len(assignments_rs) == int(assignments_rs.NumResults) 84 >>> len(assignments_rs) == int(assignments_rs.NumResults)
85 True 85 True
86 86
87 >>> assignments_rs.PageNumber 87 >>> int(assignments_rs.PageNumber)
88 u'1' 88 1
89 89
90 >>> assignments_rs.TotalNumResults >= 1 90 >>> int(assignments_rs.TotalNumResults) >= 1
91 True 91 True
92 92
93 # should contain at least one Assignment object 93 # should contain at least one Assignment object
94 >>> assignments_rs # doctest: +ELLIPSIS 94 >>> assignments_rs # doctest: +ELLIPSIS
95 [<boto.mturk.connection.Assignment instance at ...] 95 [<boto.mturk.connection.Assignment instance at ...]
96 96
97 # should have returned assignments for the requested HIT id 97 # should have returned assignments for the requested HIT id
98 >>> assignment = assignments_rs[0] 98 >>> assignment = assignments_rs[0]
99 99
100 >>> assignment.HITId == hit_id 100 >>> assignment.HITId == hit_id
(...skipping 19 matching lines...) Expand all
120 120
121 >>> qid, text = answer.fields[0] 121 >>> qid, text = answer.fields[0]
122 122
123 >>> text # doctest: +ELLIPSIS 123 >>> text # doctest: +ELLIPSIS
124 u'...' 124 u'...'
125 125
126 # question identifier should be a unicode string 126 # question identifier should be a unicode string
127 >>> qid # doctest: +ELLIPSIS 127 >>> qid # doctest: +ELLIPSIS
128 u'...' 128 u'...'
129 129
OLDNEW
« no previous file with comments | « third_party/boto/tests/integration/sts/test_session_token.py ('k') | third_party/boto/tests/unit/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698