MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_constrain_encoding

Method test_constrain_encoding

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

Source from the content-addressed store, hash-verified

55 assert r.pretty_url == "https://foo.com:22/path"
56
57 def test_constrain_encoding(self):
58 r = treq()
59 r.headers["accept-encoding"] = "gzip, oink"
60 r.constrain_encoding()
61 assert "oink" not in r.headers["accept-encoding"]
62
63 r.headers.set_all("accept-encoding", ["gzip", "oink"])
64 r.constrain_encoding()
65 assert "oink" not in r.headers["accept-encoding"]
66
67 def test_get_content_type(self):
68 resp = tresp()

Callers

nothing calls this directly

Calls 3

treqFunction · 0.90
constrain_encodingMethod · 0.80
set_allMethod · 0.45

Tested by

no test coverage detected