aboutsummaryrefslogtreecommitdiffstats
path: root/test/mitmproxy/test_flow.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-10-18 12:02:35 +1300
committerAldo Cortesi <aldo@nullcube.com>2016-10-18 12:02:35 +1300
commitd5056c5627dda172350d6ae72ace315be55a0cc9 (patch)
treec8867cb81b14c643feb5c81c777e9097de49c6f0 /test/mitmproxy/test_flow.py
parent825b02d495ef762f22b44d48ed9d923f8c54220a (diff)
downloadmitmproxy-d5056c5627dda172350d6ae72ace315be55a0cc9.tar.gz
mitmproxy-d5056c5627dda172350d6ae72ace315be55a0cc9.tar.bz2
mitmproxy-d5056c5627dda172350d6ae72ace315be55a0cc9.zip
accept_addon -> resume, intercept/resume events
Diffstat (limited to 'test/mitmproxy/test_flow.py')
-rw-r--r--test/mitmproxy/test_flow.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/mitmproxy/test_flow.py b/test/mitmproxy/test_flow.py
index 90b9b61d..02996881 100644
--- a/test/mitmproxy/test_flow.py
+++ b/test/mitmproxy/test_flow.py
@@ -121,7 +121,6 @@ class TestHTTPFlow:
f = tutils.tflow()
f.reply.handle()
f.intercept(fm)
- assert fm.handle_intercept.called
assert f.killable
f.kill(fm)
assert not f.killable
@@ -129,8 +128,9 @@ class TestHTTPFlow:
assert f.reply.value == Kill
def test_killall(self):
+ srv = DummyServer(None)
s = flow.State()
- fm = flow.FlowMaster(None, None, s)
+ fm = flow.FlowMaster(None, srv, s)
f = tutils.tflow()
f.reply.handle()
@@ -140,12 +140,12 @@ class TestHTTPFlow:
for i in s.view:
assert "killed" in str(i.error)
- def test_accept_intercept(self):
+ def test_resume(self):
f = tutils.tflow()
f.reply.handle()
f.intercept(mock.Mock())
assert f.reply.state == "taken"
- f.accept_intercept(mock.Mock())
+ f.resume(mock.Mock())
assert f.reply.state == "committed"
def test_replace_unicode(self):