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

Function test_headers

test/mitmproxy/addons/test_serverplayback.py:189–205  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

187
188
189def test_headers():
190 s = serverplayback.ServerPlayback()
191 with taddons.context(s) as tctx:
192 tctx.configure(s, server_replay_use_headers=["foo"])
193
194 r = tflow.tflow(resp=True)
195 r.request.headers["foo"] = "bar"
196 r2 = tflow.tflow(resp=True)
197 assert not s._hash(r) == s._hash(r2)
198 r2.request.headers["foo"] = "bar"
199 assert s._hash(r) == s._hash(r2)
200 r2.request.headers["oink"] = "bar"
201 assert s._hash(r) == s._hash(r2)
202
203 r = tflow.tflow(resp=True)
204 r2 = tflow.tflow(resp=True)
205 assert s._hash(r) == s._hash(r2)
206
207
208def test_load():

Callers

nothing calls this directly

Calls 3

_hashMethod · 0.95
contextMethod · 0.80
configureMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…