MCPcopy
hub / github.com/scrapy/scrapy / test_download

Method test_download

tests/test_downloader_handlers_http_base.py:101–105  ·  view source on GitHub ↗
(self, mockserver: MockServer)

Source from the content-addressed store, hash-verified

99
100 @coroutine_test
101 async def test_download(self, mockserver: MockServer) -> None:
102 request = Request(mockserver.url("/text", is_secure=self.is_secure))
103 async with self.get_dh() as download_handler:
104 response = await download_handler.download_request(request)
105 assert response.body == b"Works"
106
107 @coroutine_test
108 async def test_download_head(self, mockserver: MockServer) -> None:

Callers

nothing calls this directly

Calls 4

get_dhMethod · 0.95
RequestClass · 0.90
urlMethod · 0.45
download_requestMethod · 0.45

Tested by

no test coverage detected