(self)
| 374 | assert r.data == b"foo" |
| 375 | |
| 376 | def test_chunked_decoding_deflate(self) -> None: |
| 377 | data = zlib.compress(b"foo") |
| 378 | |
| 379 | fp = BytesIO(data) |
| 380 | r = HTTPResponse( |
| 381 | fp, headers={"content-encoding": "deflate"}, preload_content=False |
| 382 | ) |
| 383 | |
| 384 | assert r.read(1) == b"f" |
| 385 | assert r.read(2) == b"oo" |
| 386 | assert r.read() == b"" |
| 387 | assert r.read() == b"" |
| 388 | |
| 389 | def test_chunked_decoding_deflate2(self) -> None: |
| 390 | compress = zlib.compressobj(6, zlib.DEFLATED, -zlib.MAX_WBITS) |
nothing calls this directly
no test coverage detected