mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-01 18:27:18 +00:00
commit
daecd50c5a
2 changed files with 7 additions and 0 deletions
|
|
@ -35,6 +35,9 @@ class ClientPlayback:
|
|||
"""
|
||||
Replay requests from flows.
|
||||
"""
|
||||
for f in flows:
|
||||
if f.live:
|
||||
raise exceptions.CommandError("Can't replay live flow.")
|
||||
self.flows = list(flows)
|
||||
ctx.log.alert("Replaying %s flows." % len(self.flows))
|
||||
ctx.master.addons.trigger("update", [])
|
||||
|
|
|
|||
|
|
@ -52,6 +52,10 @@ class TestClientPlayback:
|
|||
cp.stop_replay()
|
||||
assert not cp.flows
|
||||
|
||||
df = tflow.DummyFlow(tflow.tclient_conn(), tflow.tserver_conn(), True)
|
||||
with pytest.raises(exceptions.CommandError, match="Can't replay live flow."):
|
||||
cp.start_replay([df])
|
||||
|
||||
def test_load_file(self, tmpdir):
|
||||
cp = clientplayback.ClientPlayback()
|
||||
with taddons.context():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue