aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Shao <me@matshao.com>2018-01-11 09:23:50 +0800
committerMatthew Shao <me@matshao.com>2018-01-11 09:23:50 +0800
commit137a78f22a91f7da7f51a62e0d616e6dc5adf7ea (patch)
treedbe2c1bdd00a636c7eed0089a4b7b164ff7d1cd1
parent0a72911f7cc9b735df7928335b573e5dee047506 (diff)
downloadmitmproxy-137a78f22a91f7da7f51a62e0d616e6dc5adf7ea.tar.gz
mitmproxy-137a78f22a91f7da7f51a62e0d616e6dc5adf7ea.tar.bz2
mitmproxy-137a78f22a91f7da7f51a62e0d616e6dc5adf7ea.zip
Add test for fix#2766.
-rw-r--r--test/mitmproxy/addons/test_clientplayback.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/mitmproxy/addons/test_clientplayback.py b/test/mitmproxy/addons/test_clientplayback.py
index 2dc7eb92..3f990668 100644
--- a/test/mitmproxy/addons/test_clientplayback.py
+++ b/test/mitmproxy/addons/test_clientplayback.py
@@ -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():