MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_check

Function test_check

test/mitmproxy/addons/test_clientplayback.py:171–191  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

169
170
171def test_check():
172 cp = ClientPlayback()
173 f = tflow.tflow(resp=True)
174 f.live = True
175 assert "live flow" in cp.check(f)
176
177 f = tflow.tflow(resp=True, live=False)
178 f.intercepted = True
179 assert "intercepted flow" in cp.check(f)
180
181 f = tflow.tflow(resp=True, live=False)
182 f.request = None
183 assert "missing request" in cp.check(f)
184
185 f = tflow.tflow(resp=True, live=False)
186 f.request.raw_content = None
187 assert "missing content" in cp.check(f)
188
189 for f in (tflow.ttcpflow(), tflow.tudpflow()):
190 f.live = False
191 assert "Can only replay HTTP" in cp.check(f)
192
193
194async def test_start_stop(tdata, caplog_async):

Callers

nothing calls this directly

Calls 2

checkMethod · 0.95
ClientPlaybackClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…