def test_skip(settings):
crawler = make_crawler(settings, _AUTOLOGIN_FORCE_SKIP=True)
with MockServer(Login) as s:
yield crawler.crawl(url=s.root_url)
spider = crawler.spider
assert set(spider.visited_urls) == {'/', '/login'}
assert all(not r.meta['autologin_active'] for r in spider.responses)
test_integration.py 文件源码
python
阅读 36
收藏 0
点赞 0
评论 0
评论列表
文章目录