()
| 1690 | """Show that we can decode the gzipped and chunked body.""" |
| 1691 | |
| 1692 | def stream() -> typing.Generator[bytes]: |
| 1693 | # Set up a generator to chunk the gzipped body |
| 1694 | compress = zlib.compressobj(6, zlib.DEFLATED, 16 + zlib.MAX_WBITS) |
| 1695 | data = compress.compress(b"foobar") |
| 1696 | data += compress.flush() |
| 1697 | for i in range(0, len(data), 2): |
| 1698 | yield data[i : i + 2] |
| 1699 | |
| 1700 | fp = MockChunkedEncodingResponse(list(stream())) |
| 1701 | r = httplib.HTTPResponse(MockSock) # type: ignore[arg-type] |
no test coverage detected