MCPcopy Create free account
hub / github.com/mitmproxy/mitmproxy / test_hash

Function test_hash

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

Source from the content-addressed store, hash-verified

167
168
169def test_hash():
170 s = serverplayback.ServerPlayback()
171 with taddons.context(s) as tctx:
172 tctx.configure(s)
173
174 r = tflow.tflow()
175 r2 = tflow.tflow()
176
177 assert s._hash(r)
178 assert s._hash(r) == s._hash(r2)
179 r.request.headers["foo"] = "bar"
180 assert s._hash(r) == s._hash(r2)
181 r.request.path = "voing"
182 assert s._hash(r) != s._hash(r2)
183
184 r.request.path = "path?blank_value"
185 r2.request.path = "path?"
186 assert s._hash(r) != s._hash(r2)
187
188
189def test_headers():

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…