PageRenderTime 12ms CodeModel.GetById 9ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

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