MCPcopy
hub / github.com/urllib3/urllib3 / test_read_chunked_not_supported

Method test_read_chunked_not_supported

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

Source from the content-addressed store, hash-verified

1746 next(r)
1747
1748 def test_read_chunked_not_supported(self) -> None:
1749 fp = BytesIO(b"foo")
1750 resp = HTTPResponse(
1751 fp, preload_content=False, headers={"transfer-encoding": "chunked"}
1752 )
1753 r = resp.read_chunked()
1754 with pytest.raises(BodyNotHttplibCompatible):
1755 next(r)
1756
1757 def test_buggy_incomplete_read(self) -> None:
1758 # Simulate buggy versions of Python (<2.7.4)

Callers

nothing calls this directly

Calls 2

read_chunkedMethod · 0.95
HTTPResponseClass · 0.90

Tested by

no test coverage detected