MCPcopy
hub / github.com/urllib3/urllib3 / test_multi_decoding_deflate_gzip

Method test_multi_decoding_deflate_gzip

test/test_response.py:912–920  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

910 assert r.data == b"foo"
911
912 def test_multi_decoding_deflate_gzip(self) -> None:
913 compress = zlib.compressobj(6, zlib.DEFLATED, 16 + zlib.MAX_WBITS)
914 data = compress.compress(zlib.compress(b"foo"))
915 data += compress.flush()
916
917 fp = BytesIO(data)
918 r = HTTPResponse(fp, headers={"content-encoding": "deflate, gzip"})
919
920 assert r.data == b"foo"
921
922 def test_multi_decoding_gzip_gzip(self) -> None:
923 compress = zlib.compressobj(6, zlib.DEFLATED, 16 + zlib.MAX_WBITS)

Callers

nothing calls this directly

Calls 2

HTTPResponseClass · 0.90
flushMethod · 0.45

Tested by

no test coverage detected