示例#1
0
    def test_parse_options_xml(self, data):
        xml = etree.fromstring("".join(data['xml']))
        result = parse_options_xml(xml)

        self.assertEqual(
            result,
            (data['expect']['options'], data['expect']['correct_answer'], data['expect']['correct_rationale'])
        )
示例#2
0
    def test_parse_options_xml(self, data):
        xml = etree.fromstring("".join(data['xml']))
        result = parse_options_xml(xml)

        self.assertEqual(
            result,
            (data['expect']['options'], data['expect']['correct_answer'],
             data['expect']['correct_rationale']))
示例#3
0
 def test_parse_options_xml_errors(self, data):
     xml = etree.fromstring("".join(data['xml']))
     with self.assertRaises(ValidationError):
         parse_options_xml(xml)
示例#4
0
 def test_parse_options_xml_errors(self, data):
     xml = etree.fromstring("".join(data['xml']))
     with self.assertRaises(ValidationError):
         parse_options_xml(xml)