(self)
| 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") |
nothing calls this directly
no test coverage detected