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

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

Issue 12317103: Added gsutil to depot tools (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: added readme Created 7 years, 9 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
OLDNEW
(Empty)
1 from boto.mturk.connection import MTurkConnection
2 from boto.mturk.question import ExternalQuestion
3 from boto.mturk.qualification import Qualifications, PercentAssignmentsApprovedR equirement
4
5 def test():
6 q = ExternalQuestion(external_url="http://websort.net/s/F3481C", frame_heigh t=800)
7 conn = MTurkConnection(host='mechanicalturk.sandbox.amazonaws.com')
8 keywords=['boto', 'test', 'doctest']
9 qualifications = Qualifications()
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, durati on=60*6, approval_delay=60*60, annotation='An annotation from boto external ques tion test', qualifications=qualifications)
12 assert(create_hit_rs.status == True)
13 print create_hit_rs.HITTypeId
14
15 if __name__ == "__main__":
16 test()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698