<s> import unittest <EOL> import uuid <EOL> import datetime <EOL> from boto . mturk . question import ( <EOL> Question , QuestionContent , AnswerSpecification , FreeTextAnswer , <EOL> ) <EOL> from _init_environment import SetHostMTurkConnection <EOL> class MTurkCommon ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . conn = SetHostMTurkConnection ( ) <EOL> @ staticmethod <EOL> def get_question ( ) : <EOL> qn_content = QuestionContent ( ) <EOL> qn_content . append_field ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> qn_content . append_field ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> qn = Question ( identifier = str ( uuid . uuid4 ( ) ) , <EOL> content = qn_content , <EOL> answer_spec = AnswerSpecification ( FreeTextAnswer ( ) ) ) <EOL> return qn <EOL> @ staticmethod <EOL> def get_hit_params ( ) : <EOL> return dict ( <EOL> lifetime = datetime . timedelta ( minutes = <NUM_LIT> ) , <EOL> max_assignments = <NUM_LIT:2> , <EOL> title = '<STR_LIT>' , <EOL> description = '<STR_LIT>' , <EOL> keywords = [ '<STR_LIT>' , '<STR_LIT:test>' ] , <EOL> reward = <NUM_LIT> , <EOL> duration = datetime . timedelta ( minutes = <NUM_LIT:6> ) , <EOL> approval_delay = <NUM_LIT> * <NUM_LIT> , <EOL> annotation = '<STR_LIT>' , <EOL> response_groups = [ '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , ] , <EOL> ) </s>
