MCPcopy
hub / github.com/scrapy/scrapy / test_request_response

Method test_request_response

tests/test_downloadermiddleware.py:64–69  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

62
63 @coroutine_test
64 async def test_request_response(self):
65 req = Request("http://example.com/index.html")
66 resp = Response(req.url, status=200)
67 async with self.get_mwman() as mwman:
68 ret = await self._download(mwman, req, resp)
69 assert isinstance(ret, Response), "Non-response returned"
70
71 @coroutine_test
72 async def test_3xx_and_invalid_gzipped_body_must_redirect(self):

Callers

nothing calls this directly

Calls 4

RequestClass · 0.90
ResponseClass · 0.90
get_mwmanMethod · 0.80
_downloadMethod · 0.45

Tested by

no test coverage detected