()
| 12 | |
| 13 | |
| 14 | def test_gunzip_basic(): |
| 15 | r1 = Response( |
| 16 | "http://www.example.com", |
| 17 | body=(SAMPLEDIR / "feed-sample1.xml.gz").read_bytes(), |
| 18 | ) |
| 19 | assert gzip_magic_number(r1) |
| 20 | |
| 21 | r2 = Response("http://www.example.com", body=gunzip(r1.body)) |
| 22 | assert not gzip_magic_number(r2) |
| 23 | assert len(r2.body) == 9950 |
| 24 | |
| 25 | |
| 26 | def test_gunzip_truncated(): |
nothing calls this directly
no test coverage detected