Пример #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()
Пример #2
0
 def test_utf8_html_markup(self):
     checker = XMLChecker('bogus', utf8_html_markup, self.reporter)
     checker.check()
     self.assertEqual([], self.reporter.messages)
Пример #3
0
 def test_html5_dtd(self):
     checker = XMLChecker('bogus', html5_dtd_and_entity, self.reporter)
     checker.check()
     self.assertEqual([], self.reporter.messages)
Пример #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)
Пример #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)