MCPcopy
hub / github.com/scrapy/scrapy / test_disabled_handler

Method test_disabled_handler

tests/test_downloader_handlers.py:91–100  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

89 )
90
91 def test_disabled_handler(self):
92 handlers = {"scheme": None}
93 crawler = get_crawler(settings_dict={"DOWNLOAD_HANDLERS": handlers})
94 dh = DownloadHandlers(crawler)
95 assert "scheme" not in dh._schemes
96 assert dh._get_handler("scheme") is None
97 assert "scheme" not in dh._handlers
98 assert "scheme" in dh._notconfigured
99 # get the handler again to cover the code that gets it from dh._notconfigured
100 assert dh._get_handler("scheme") is None
101
102 def test_lazy_handlers(self):
103 handlers = {"scheme": DummyLazyDH}

Callers

nothing calls this directly

Calls 3

_get_handlerMethod · 0.95
get_crawlerFunction · 0.90
DownloadHandlersClass · 0.90

Tested by

no test coverage detected