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

Function test_start_stop

test/mitmproxy/addons/test_clientplayback.py:194–207  ·  view source on GitHub ↗
(tdata, caplog_async)

Source from the content-addressed store, hash-verified

192
193
194async def test_start_stop(tdata, caplog_async):
195 cp = ClientPlayback()
196 with taddons.context(cp):
197 cp.start_replay([tflow.tflow(live=False)])
198 assert cp.count() == 1
199
200 ws_flow = tflow.twebsocketflow()
201 ws_flow.live = False
202 cp.start_replay([ws_flow])
203 await caplog_async.await_log("Can't replay WebSocket flows.")
204 assert cp.count() == 1
205
206 cp.stop_replay()
207 assert cp.count() == 0
208
209
210def test_load(tdata):

Callers

nothing calls this directly

Calls 6

start_replayMethod · 0.95
countMethod · 0.95
stop_replayMethod · 0.95
ClientPlaybackClass · 0.90
contextMethod · 0.80
await_logMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…