OLD | NEW |
(Empty) | |
| 1 import unittest |
| 2 import uuid |
| 3 import datetime |
| 4 from boto.mturk.question import ExternalQuestion |
| 5 |
| 6 from _init_environment import SetHostMTurkConnection, external_url, \ |
| 7 config_environment |
| 8 |
| 9 class Test(unittest.TestCase): |
| 10 def setUp(self): |
| 11 config_environment() |
| 12 |
| 13 def test_create_hit_external(self): |
| 14 q = ExternalQuestion(external_url=external_url, frame_height=800
) |
| 15 conn = SetHostMTurkConnection() |
| 16 keywords=['boto', 'test', 'doctest'] |
| 17 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 e
xternal question test', response_groups=['Minimal', 'HITDetail', 'HITQuestion',
'HITAssignmentSummary',]) |
| 18 assert(create_hit_rs.status == True) |
| 19 |
| 20 if __name__ == "__main__": |
| 21 unittest.main() |
OLD | NEW |