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)
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())