MCPcopy
hub / github.com/urllib3/urllib3 / test_reference_read1_nodecode

Method test_reference_read1_nodecode

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

Source from the content-addressed store, hash-verified

335 assert r.read1(*read1_args) == b"foo"
336
337 def test_reference_read1_nodecode(self) -> None:
338 fp = BytesIO(b"foobar")
339 r = HTTPResponse(fp, preload_content=False, decode_content=False)
340
341 assert r.read1(0) == b""
342 assert r.read1(1) == b"f"
343 assert r.read1(2) == b"oo"
344 assert r.read1() == b"bar"
345 assert r.read1() == b""
346
347 def test_decoding_read1(self) -> None:
348 data = zlib.compress(b"foobar")

Callers

nothing calls this directly

Calls 2

read1Method · 0.95
HTTPResponseClass · 0.90

Tested by

no test coverage detected