MCPcopy
hub / github.com/scrapy/scrapy / test_url_is_from_spider

Function test_url_is_from_spider

tests/test_utils_url.py:41–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39
40
41def test_url_is_from_spider():
42 class MySpider(Spider):
43 name = "example.com"
44
45 assert url_is_from_spider("http://www.example.com/some/page.html", MySpider)
46 assert url_is_from_spider("http://sub.example.com/some/page.html", MySpider)
47 assert not url_is_from_spider("http://www.example.org/some/page.html", MySpider)
48 assert not url_is_from_spider("http://www.example.net/some/page.html", MySpider)
49
50
51def test_url_is_from_spider_class_attributes():

Callers

nothing calls this directly

Calls 1

url_is_from_spiderFunction · 0.90

Tested by

no test coverage detected