def test_in_crawled_domain_parent_domain(self): link = Link(self.crawled_page, "http://example.com/foo.html") self.assertFalse(link.in_crawled_domain())
def test_in_crawled_domain_different_scheme(self): link = Link(self.crawled_page, "https://www.example.com/foo.html") self.assertTrue(link.in_crawled_domain())
def test_in_crawled_domain_with_absolute_path_different_port(self): link = Link(self.crawled_page, "http://www.example.com:123/foo.html") self.assertTrue(link.in_crawled_domain())
def test_in_crawled_domain_with_relative_path(self): link = Link(self.crawled_page, "foo.html") self.assertTrue(link.in_crawled_domain())
def test_in_crawled_domain(self): link = Link(self.crawled_page, "") self.assertTrue(link.in_crawled_domain())
def test_in_crawled_domain_different_subdomain(self): link = Link(self.crawled_page, "http://foo.example.net/") self.assertFalse(link.in_crawled_domain())