()
| 39 | |
| 40 | |
| 41 | def 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 | |
| 51 | def test_url_is_from_spider_class_attributes(): |
nothing calls this directly
no test coverage detected