Esempio n. 1
0
 def create_and_check(self, file_name, text):
     """Used by the TestAnyTextMixin tests."""
     checker = XMLChecker(file_name, text, self.reporter)
     checker.check_text()
Esempio n. 2
0
 def test_utf8_html_markup(self):
     checker = XMLChecker('bogus', utf8_html_markup, self.reporter)
     checker.check()
     self.assertEqual([], self.reporter.messages)
Esempio n. 3
0
 def test_html5_dtd(self):
     checker = XMLChecker('bogus', html5_dtd_and_entity, self.reporter)
     checker.check()
     self.assertEqual([], self.reporter.messages)
Esempio n. 4
0
 def test_ill_formed_markup(self):
     checker = XMLChecker('bogus', ill_formed_markup, self.reporter)
     checker.check()
     self.assertEqual(
         [(3, 'not well-formed (invalid token)')], self.reporter.messages)
Esempio n. 5
0
 def test_missing_dtd_and_xml(self):
     checker = XMLChecker('bogus', missing_dtd_and_xml, self.reporter)
     checker.check()
     self.assertEqual([], self.reporter.messages)