| OLD | NEW |
| 1 import unittest | 1 import unittest |
| 2 import uuid | 2 import uuid |
| 3 import datetime | 3 import datetime |
| 4 from boto.mturk.question import ExternalQuestion | 4 from boto.mturk.question import ExternalQuestion |
| 5 | 5 |
| 6 from _init_environment import SetHostMTurkConnection, external_url | 6 from _init_environment import SetHostMTurkConnection, external_url |
| 7 | 7 |
| 8 class Test(unittest.TestCase): | 8 class Test(unittest.TestCase): |
| 9 def test_create_hit_external(self): | 9 def test_create_hit_external(self): |
| 10 q = ExternalQuestion(external_url=external_url, frame_height=800
) | 10 q = ExternalQuestion(external_url=external_url, frame_height=800
) |
| 11 conn = SetHostMTurkConnection() | 11 conn = SetHostMTurkConnection() |
| 12 keywords=['boto', 'test', 'doctest'] | 12 keywords=['boto', 'test', 'doctest'] |
| 13 create_hit_rs = conn.create_hit(question=q, lifetime=60*65,max_a
ssignments=2,title="Boto External Question Test", keywords=keywords,reward = 0.0
5, duration=60*6,approval_delay=60*60, annotation='An annotation from boto exter
nal question test', response_groups=['Minimal','HITDetail','HITQuestion','HITAss
ignmentSummary',]) | 13 create_hit_rs = conn.create_hit(question=q, lifetime=60*65,max_a
ssignments=2,title="Boto External Question Test", keywords=keywords,reward = 0.0
5, duration=60*6,approval_delay=60*60, annotation='An annotation from boto exter
nal question test', response_groups=['Minimal','HITDetail','HITQuestion','HITAss
ignmentSummary',]) |
| 14 assert(create_hit_rs.status == True) | 14 assert(create_hit_rs.status == True) |
| 15 | 15 |
| 16 if __name__ == "__main__": | 16 if __name__ == "__main__": |
| 17 unittest.main() | 17 unittest.main() |
| OLD | NEW |