(self)
| 211 | assert r._body == b"foo" |
| 212 | |
| 213 | def test_cache_content_preload_false(self) -> None: |
| 214 | fp = BytesIO(b"foo") |
| 215 | r = HTTPResponse(fp, preload_content=False) |
| 216 | |
| 217 | assert not r._body |
| 218 | assert r.data == b"foo" |
| 219 | assert r._body == b"foo" # type: ignore[comparison-overlap] |
| 220 | assert r.data == b"foo" |
| 221 | |
| 222 | @pytest.mark.parametrize("read_args", ((), (None,), (-1,))) |
| 223 | def test_cache_content_with_explicit_read_call( |
nothing calls this directly
no test coverage detected