/boto-2.5.2/tests/mturk/create_hit_test.py

# · Python · 21 lines · 17 code · 4 blank · 0 comment · 1 complexity · 9cd69f4b67c4b0ec6443a5970af57952 MD5 · raw file

  1. import unittest
  2. import os
  3. from boto.mturk.question import QuestionForm
  4. from common import MTurkCommon
  5. class TestHITCreation(MTurkCommon):
  6. def testCallCreateHitWithOneQuestion(self):
  7. create_hit_rs = self.conn.create_hit(
  8. question=self.get_question(),
  9. **self.get_hit_params()
  10. )
  11. def testCallCreateHitWithQuestionForm(self):
  12. create_hit_rs = self.conn.create_hit(
  13. questions=QuestionForm([self.get_question()]),
  14. **self.get_hit_params()
  15. )
  16. if __name__ == '__main__':
  17. unittest.main()