def create_and_check(self, file_name, text): """Used by the TestAnyTextMixin tests.""" checker = XMLChecker(file_name, text, self.reporter) checker.check_text()
def test_utf8_html_markup(self): checker = XMLChecker('bogus', utf8_html_markup, self.reporter) checker.check() self.assertEqual([], self.reporter.messages)
def test_html5_dtd(self): checker = XMLChecker('bogus', html5_dtd_and_entity, self.reporter) checker.check() self.assertEqual([], self.reporter.messages)
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)
def test_missing_dtd_and_xml(self): checker = XMLChecker('bogus', missing_dtd_and_xml, self.reporter) checker.check() self.assertEqual([], self.reporter.messages)