(self)
| 345 | assert r.read1() == b"" |
| 346 | |
| 347 | def test_decoding_read1(self) -> None: |
| 348 | data = zlib.compress(b"foobar") |
| 349 | |
| 350 | fp = BytesIO(data) |
| 351 | r = HTTPResponse( |
| 352 | fp, headers={"content-encoding": "deflate"}, preload_content=False |
| 353 | ) |
| 354 | |
| 355 | assert r.read1(1) == b"f" |
| 356 | assert r.read1(2) == b"oo" |
| 357 | assert r.read1() == b"bar" |
| 358 | assert r.read1() == b"" |
| 359 | |
| 360 | def test_decode_deflate(self) -> None: |
| 361 | data = zlib.compress(b"foo") |
nothing calls this directly
no test coverage detected