aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2017-11-06 15:34:18 +0100
committerMaximilian Hils <git@maximilianhils.com>2017-11-07 11:49:12 +0100
commit4a2a718bc291b3f720e955b1c4bc10b4a292dfd0 (patch)
tree7bdbfd23249a36edf61ef2d365e234034becca12 /test
parente6e28c2ac37652ad21cf7a4e351c419fffa10f4b (diff)
downloadmitmproxy-4a2a718bc291b3f720e955b1c4bc10b4a292dfd0.tar.gz
mitmproxy-4a2a718bc291b3f720e955b1c4bc10b4a292dfd0.tar.bz2
mitmproxy-4a2a718bc291b3f720e955b1c4bc10b4a292dfd0.zip
improve clientreplay addon
- always refresh UI after flow is finished (refs #2616) - count currently active replay - make replay thread daemonic so that users can exit mitmproxy if replay hangs. This is not perfect yet, but vastly better than how it has been.
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/addons/test_clientplayback.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/mitmproxy/addons/test_clientplayback.py b/test/mitmproxy/addons/test_clientplayback.py
index 6089b2d5..2dc7eb92 100644
--- a/test/mitmproxy/addons/test_clientplayback.py
+++ b/test/mitmproxy/addons/test_clientplayback.py
@@ -36,9 +36,12 @@ class TestClientPlayback:
assert rp.called
assert cp.current_thread
- cp.flows = None
- cp.current_thread = None
+ cp.flows = []
+ cp.current_thread.is_alive.return_value = False
+ assert cp.count() == 1
cp.tick()
+ assert cp.count() == 0
+ assert tctx.master.has_event("update")
assert tctx.master.has_event("processing_complete")
cp.current_thread = MockThread()