Пример #1
0
 def test_unopened_tag(self):
     self.parser = resources.ResourceHTMLParser('')
     self.parser.feed('Lorem ipsum </script> dolor sit.')
     content = self.parser.get_content()
     for text in ['Lorem', 'ipsum', 'dolor', 'sit']:
         self.assertIn(text, content)
Пример #2
0
    def setUp(self):
        super(ParserTests, self).setUp()

        self.parser = resources.ResourceHTMLParser(VALID_PAGE_URL)
        self.parser.feed(VALID_PAGE)