def _test_no_link(self, content): def callback(url, line, column, name, base): self.assertTrue(False, 'URL %r found' % url) linkparse.find_links(htmlsoup.make_soup(content), callback, linkparse.LinkTags)
def _test_one_link(self, content, url): self.count_url = 0 linkparse.find_links(htmlsoup.make_soup(content), self._test_one_url(url), linkparse.LinkTags) self.assertEqual(self.count_url, 1)