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)
def setUp(self): super(ParserTests, self).setUp() self.parser = resources.ResourceHTMLParser(VALID_PAGE_URL) self.parser.feed(VALID_PAGE)