MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_modify

Method test_modify

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

Source from the content-addressed store, hash-verified

1001 assert int(r.headers["content-length"]) == 7
1002
1003 def test_modify(self):
1004 r = tresp()
1005 assert "content-encoding" not in r.headers
1006 r.encode("gzip")
1007
1008 r.content = b"foo"
1009 assert r.raw_content != b"foo"
1010 r.decode()
1011 assert r.raw_content == b"foo"
1012
1013 with pytest.raises(TypeError):
1014 r.content = "foo"
1015
1016 def test_unknown_ce(self):
1017 r = tresp()

Callers

nothing calls this directly

Calls 3

trespFunction · 0.90
encodeMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected