From 4a2a718bc291b3f720e955b1c4bc10b4a292dfd0 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Mon, 6 Nov 2017 15:34:18 +0100 Subject: 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. --- test/mitmproxy/addons/test_clientplayback.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test') 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() -- cgit v1.2.3