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

Side by Side Diff: third_party/gsutil/boto/tests/mturk/create_hit_with_qualifications.py

Issue 10199002: Upgrade gsutil to 3.4 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments Created 8 years, 7 months 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 from boto.mturk.connection import MTurkConnection 1 from boto.mturk.connection import MTurkConnection
2 from boto.mturk.question import ExternalQuestion 2 from boto.mturk.question import ExternalQuestion
3 from boto.mturk.qualification import Qualifications, PercentAssignmentsApprovedR equirement 3 from boto.mturk.qualification import Qualifications, PercentAssignmentsApprovedR equirement
4 4
5 def test(): 5 def test():
6 q = ExternalQuestion(external_url="http://websort.net/s/F3481C", frame_heigh t=800) 6 q = ExternalQuestion(external_url="http://websort.net/s/F3481C", frame_heigh t=800)
7 conn = MTurkConnection(host='mechanicalturk.sandbox.amazonaws.com') 7 conn = MTurkConnection(host='mechanicalturk.sandbox.amazonaws.com')
8 keywords=['boto', 'test', 'doctest'] 8 keywords=['boto', 'test', 'doctest']
9 qualifications = Qualifications() 9 qualifications = Qualifications()
10 qualifications.add(PercentAssignmentsApprovedRequirement(comparator="Greater Than", integer_value="95")) 10 qualifications.add(PercentAssignmentsApprovedRequirement(comparator="Greater Than", integer_value="95"))
11 create_hit_rs = conn.create_hit(question=q, lifetime=60*65,max_assignments=2 ,title="Boto External Question Test", keywords=keywords,reward = 0.05, duration= 60*6,approval_delay=60*60, annotation='An annotation from boto external question test', qualifications=qualifications) 11 create_hit_rs = conn.create_hit(question=q, lifetime=60*65,max_assignments=2 ,title="Boto External Question Test", keywords=keywords,reward = 0.05, duration= 60*6,approval_delay=60*60, annotation='An annotation from boto external question test', qualifications=qualifications)
12 assert(create_hit_rs.status == True) 12 assert(create_hit_rs.status == True)
13 print create_hit_rs.HITTypeId 13 print create_hit_rs.HITTypeId
14 14
15 if __name__ == "__main__": 15 if __name__ == "__main__":
16 test() 16 test()
OLDNEW
« no previous file with comments | « third_party/gsutil/boto/tests/mturk/create_hit_test.py ('k') | third_party/gsutil/boto/tests/mturk/hit_persistence.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698