コード例 #1
0
ファイル: builder_tests.py プロジェクト: SEL-Columbia/pyxform
 def test_uniqueness_of_section_names(self):
     #Looking at the xls file, I think this test might be broken.
     survey = utils.build_survey('group_names_must_be_unique.xls')
     self.assertRaises(
         Exception,
         survey.to_xml
     )
コード例 #2
0
ファイル: builder_tests.py プロジェクト: mattlangeman/pyxform
 def test_new_widgets(self):
     survey = utils.build_survey('widgets.xls')
     path = utils.path_to_text_fixture('widgets.xml')
     survey.to_xml
     with open(path) as f:
         expected = etree.fromstring(survey.to_xml())
         result = etree.fromstring(f.read())
         self.assertTrue(xml_compare(expected, result))
コード例 #3
0
ファイル: builder_tests.py プロジェクト: Topol/pyxform
 def test_new_widgets(self):
     survey = utils.build_survey('widgets.xls')
     path = utils.path_to_text_fixture('widgets.xml')
     survey.to_xml
     with open(path) as f:
         expected = etree.fromstring(survey.to_xml())
         result = etree.fromstring(f.read())
         self.assertTrue(xml_compare(expected, result))
コード例 #4
0
ファイル: builder_tests.py プロジェクト: SEL-Columbia/pyxform
 def test_unknown_question_type(self):
     survey = utils.build_survey('unknown_question_type.xls')
     self.assertRaises(
         PyXFormError,
         survey.to_xml
     )
コード例 #5
0
ファイル: builder_tests.py プロジェクト: mattlangeman/pyxform
 def test_uniqueness_of_section_names(self):
     #Looking at the xls file, I think this test might be broken.
     survey = utils.build_survey('group_names_must_be_unique.xls')
     self.assertRaises(Exception, survey.to_xml)
コード例 #6
0
ファイル: builder_tests.py プロジェクト: mattlangeman/pyxform
 def test_unknown_question_type(self):
     survey = utils.build_survey('unknown_question_type.xls')
     self.assertRaises(PyXFormError, survey.to_xml)
コード例 #7
0
ファイル: builder_tests.py プロジェクト: bderenzi/pyxform
 def test_new_widgets(self):
     survey = utils.build_survey('widgets.xls')
     path = utils.path_to_text_fixture('widgets.xml')
     survey.to_xml
     with open(path) as f:
         self.assertMultiLineEqual(survey.to_xml(), f.read())