mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-04-24 12:25:00 +08:00
Integrated encode/decoder for brotli
This commit is contained in:
@@ -21,6 +21,18 @@ def test_gzip():
|
||||
encoding.decode(b"bogus", "gzip")
|
||||
|
||||
|
||||
def test_brotli():
|
||||
assert b"string" == encoding.decode(
|
||||
encoding.encode(
|
||||
b"string",
|
||||
"br"
|
||||
),
|
||||
"br"
|
||||
)
|
||||
with tutils.raises(ValueError):
|
||||
encoding.decode(b"bogus", "br")
|
||||
|
||||
|
||||
def test_deflate():
|
||||
assert b"string" == encoding.decode(
|
||||
encoding.encode(
|
||||
|
||||
Reference in New Issue
Block a user