aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2014-11-14 00:26:22 +0100
committerMaximilian Hils <git@maximilianhils.com>2014-11-14 00:26:22 +0100
commit0c52b4e3b9137e22f6c8c649d6b584d44d7f4b75 (patch)
treeb39d859a851009d067057dc55f92114047747988 /test
parent9b5a8af12d820fd3593424989759568e7cffd596 (diff)
downloadmitmproxy-0c52b4e3b9137e22f6c8c649d6b584d44d7f4b75.tar.gz
mitmproxy-0c52b4e3b9137e22f6c8c649d6b584d44d7f4b75.tar.bz2
mitmproxy-0c52b4e3b9137e22f6c8c649d6b584d44d7f4b75.zip
handle script hooks in replay, fix tests, fix #402
Diffstat (limited to 'test')
-rw-r--r--test/test_flow.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/test_flow.py b/test/test_flow.py
index 8c197153..22abb4d4 100644
--- a/test/test_flow.py
+++ b/test/test_flow.py
@@ -86,19 +86,20 @@ class TestClientPlaybackState:
fm = flow.FlowMaster(None, s)
fm.start_client_playback([first, tutils.tflow()], True)
c = fm.client_playback
+ c.testing = True
assert not c.done()
assert not s.flow_count()
assert c.count() == 2
- c.tick(fm, testing=True)
+ c.tick(fm)
assert s.flow_count()
assert c.count() == 1
- c.tick(fm, testing=True)
+ c.tick(fm)
assert c.count() == 1
c.clear(c.current)
- c.tick(fm, testing=True)
+ c.tick(fm)
assert c.count() == 0
c.clear(c.current)
assert c.done()
@@ -696,6 +697,7 @@ class TestFlowMaster:
fm = flow.FlowMaster(DummyServer(ProxyConfig()), s)
assert not fm.start_server_playback(pb, False, [], False, False, None, False)
assert not fm.start_client_playback(pb, False)
+ fm.client_playback.testing = True
q = Queue.Queue()
assert not fm.state.flow_count()