MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_unknown_ce

Method test_unknown_ce

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

Source from the content-addressed store, hash-verified

1169 assert r.headers["content-length"] == "2"
1170
1171 def test_unknown_ce(self):
1172 r = tresp()
1173 r.headers["content-type"] = "text/html; charset=wtf"
1174 r.raw_content = b"foo"
1175 with pytest.raises(ValueError):
1176 assert r.text == "foo"
1177 assert r.get_text(strict=False) == "foo"
1178
1179 def test_cannot_decode(self):
1180 r = tresp()

Callers

nothing calls this directly

Calls 2

trespFunction · 0.90
get_textMethod · 0.45

Tested by

no test coverage detected