(self)
| 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} |
nothing calls this directly
no test coverage detected