MCPcopy
hub / github.com/urllib3/urllib3 / test_read_chunked_zero_amt

Method test_read_chunked_zero_amt

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

Source from the content-addressed store, hash-verified

1522 assert data == []
1523
1524 def test_read_chunked_zero_amt(self) -> None:
1525 r = httplib.HTTPResponse(MockSock) # type: ignore[arg-type]
1526 r.fp = MockChunkedEncodingResponse([b"hello"]) # type: ignore[assignment]
1527 r.chunked = True
1528 r.chunk_left = None
1529 resp = HTTPResponse(
1530 r, preload_content=False, headers={"transfer-encoding": "chunked"}
1531 )
1532 assert len(list(resp.read_chunked(0))) == 0
1533
1534 @pytest.mark.parametrize(
1535 "preload_content, amt, read_meth",

Callers

nothing calls this directly

Calls 3

read_chunkedMethod · 0.95
HTTPResponseClass · 0.90

Tested by

no test coverage detected