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