Ejemplo n.º 1
0
 def test_get_validation_errors_invalid_XML_using_file(self):
     sch = Schema(self.xsd_file)
     errors = sch.get_validation_errors(self.xml_file_invalid)
     self.assertTrue(len(errors) > 0)
     self.assertItemsEqual([(u'SCHEMASV', 2, 0, u'ERROR', u'SCHEMAV_CVC_ELT_1',
         u"Element 'wizard': No matching global declaration available for the validation root.")], errors)
Ejemplo n.º 2
0
 def test_get_validation_errors_using_file(self):
     sch = Schema(self.xsd_file)
     errors = sch.get_validation_errors(self.xml_string)
     self.assertEqual(errors, list())