def setUp(self): survey_out = Survey(type=u"survey") question = InputQuestion(name=u"age") question.set(InputQuestion.TYPE, u"integer") question.set(InputQuestion.LABEL, u"How old are you?") survey_out.add_child(question) self.survey_out_dict = survey_out.to_dict() print_pyobj_to_json(self.survey_out_dict, "pyxform/tests/how_old_are_you.json")
def setUp(self): survey_out = Survey( type=u"survey" ) question = InputQuestion(name=u"age") question.set(InputQuestion.TYPE, u"integer") question.set(InputQuestion.LABEL, u"How old are you?") survey_out.add_child(question) self.survey_out_dict = survey_out.to_dict() print_pyobj_to_json(self.survey_out_dict, "pyxform/tests/how_old_are_you.json")
def setUp(self): self.this_directory = os.path.dirname(__file__) survey_out = Survey( name=u"age", type=u"survey" ) question = InputQuestion(name=u"age") question.set(InputQuestion.TYPE, u"integer") question.set(InputQuestion.LABEL, u"How old are you?") survey_out.add_child(question) self.survey_out_dict = survey_out.to_dict() print_pyobj_to_json(self.survey_out_dict, utils.path_to_text_fixture("how_old_are_you.json"))