()
| 34 | |
| 35 | |
| 36 | def test_gunzip_truncated_short(): |
| 37 | r1 = Response( |
| 38 | "http://www.example.com", |
| 39 | body=(SAMPLEDIR / "truncated-crc-error-short.gz").read_bytes(), |
| 40 | ) |
| 41 | assert gzip_magic_number(r1) |
| 42 | |
| 43 | r2 = Response("http://www.example.com", body=gunzip(r1.body)) |
| 44 | assert r2.body.endswith(b"</html>") |
| 45 | assert not gzip_magic_number(r2) |
| 46 | |
| 47 | |
| 48 | def test_is_gzipped_empty(): |
nothing calls this directly
no test coverage detected