MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / test_utf8_as_ce

Method test_utf8_as_ce

test/mitmproxy/test_http.py:1025–1032  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1023 assert r.get_content(strict=False) == b"foo"
1024
1025 def test_utf8_as_ce(self):
1026 r = tresp()
1027 r.headers["content-encoding"] = "utf8"
1028 r.raw_content = b"foo"
1029 with pytest.raises(ValueError):
1030 assert r.content
1031 assert r.headers["content-encoding"]
1032 assert r.get_content(strict=False) == b"foo"
1033
1034 def test_cannot_decode(self):
1035 r = tresp()

Callers

nothing calls this directly

Calls 2

trespFunction · 0.90
get_contentMethod · 0.80

Tested by

no test coverage detected