Exemple #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'])
        )
Exemple #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']))
Exemple #3
0
 def test_parse_options_xml_errors(self, data):
     xml = etree.fromstring("".join(data['xml']))
     with self.assertRaises(ValidationError):
         parse_options_xml(xml)
Exemple #4
0
 def test_parse_options_xml_errors(self, data):
     xml = etree.fromstring("".join(data['xml']))
     with self.assertRaises(ValidationError):
         parse_options_xml(xml)