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