def linkcheck_site(root_dir): webserver.start(root_dir=root_dir, port=PORT) crawled_site = crawl('http://127.0.0.1:%d/' % PORT) if crawled_site.error_pages: report_linkcheck_errors(crawled_site.error_pages) return False return True
def linkcheck_site(root_dir): webserver.start(root_dir=root_dir, port=PORT) crawled_site = crawl("http://127.0.0.1:%d/" % PORT) if crawled_site.error_pages: report_linkcheck_errors(crawled_site.error_pages) return False return True
def test_api(self): url = self.get_url("/index.html") site = api.crawl(url) self.assertEqual(11, len(site.pages)) self.assertEqual(1, len(site.error_pages))