MCPcopy
hub / github.com/urllib3/urllib3 / test_cache_content_preload_false

Method test_cache_content_preload_false

test/test_response.py:213–220  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

211 assert r._body == b"foo"
212
213 def test_cache_content_preload_false(self) -> None:
214 fp = BytesIO(b"foo")
215 r = HTTPResponse(fp, preload_content=False)
216
217 assert not r._body
218 assert r.data == b"foo"
219 assert r._body == b"foo" # type: ignore[comparison-overlap]
220 assert r.data == b"foo"
221
222 @pytest.mark.parametrize("read_args", ((), (None,), (-1,)))
223 def test_cache_content_with_explicit_read_call(

Callers

nothing calls this directly

Calls 1

HTTPResponseClass · 0.90

Tested by

no test coverage detected