diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/addons/test_intercept.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/mitmproxy/addons/test_intercept.py b/test/mitmproxy/addons/test_intercept.py index 19828a62..f389ff8e 100644 --- a/test/mitmproxy/addons/test_intercept.py +++ b/test/mitmproxy/addons/test_intercept.py @@ -3,6 +3,7 @@ from mitmproxy import options from mitmproxy import exceptions from mitmproxy.test import taddons from mitmproxy.test import tutils +from mitmproxy.test import tflow class Options(options.Options): @@ -23,3 +24,13 @@ def test_simple(): r, intercept="~~" ) + + tctx.configure(r, intercept="~s") + + f = tflow.tflow(resp=True) + tctx.cycle(r, f) + assert f.intercepted + + f = tflow.tflow(resp=False) + tctx.cycle(r, f) + assert not f.intercepted |