aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2016-10-01 12:44:17 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2016-10-03 11:45:54 +0200
commitbb60b76af49eaa904cf3ebd24a4694e2c6f29cae (patch)
treea4119e480e22d77dc134224d37a72723bca440af /test
parent5f8b8bf35e7a8c434310c93c13871f863f12fecc (diff)
downloadmitmproxy-bb60b76af49eaa904cf3ebd24a4694e2c6f29cae.tar.gz
mitmproxy-bb60b76af49eaa904cf3ebd24a4694e2c6f29cae.tar.bz2
mitmproxy-bb60b76af49eaa904cf3ebd24a4694e2c6f29cae.zip
use flowfilter.match
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/test_flow.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/mitmproxy/test_flow.py b/test/mitmproxy/test_flow.py
index 6b24e55a..a5a302a5 100644
--- a/test/mitmproxy/test_flow.py
+++ b/test/mitmproxy/test_flow.py
@@ -68,14 +68,14 @@ class TestHTTPFlow(object):
def test_match(self):
f = tutils.tflow(resp=True)
- assert not f.match("~b test")
- assert f.match(None)
- assert not f.match("~b test")
+ assert not flowfilter.match(f, "~b test")
+ assert flowfilter.match(f, None)
+ assert not flowfilter.match(f, "~b test")
f = tutils.tflow(err=True)
- assert f.match("~e")
+ assert flowfilter.match(f, "~e")
- tutils.raises(ValueError, f.match, "~")
+ tutils.raises(ValueError, flowfilter.match, f, "~")
def test_backup(self):
f = tutils.tflow()
@@ -195,14 +195,14 @@ class TestTCPFlow:
def test_match(self):
f = tutils.ttcpflow()
- assert not f.match("~b nonexistent")
- assert f.match(None)
- assert not f.match("~b nonexistent")
+ assert not flowfilter.match(f, "~b nonexistent")
+ assert flowfilter.match(f, None)
+ assert not flowfilter.match(f, "~b nonexistent")
f = tutils.ttcpflow(err=True)
- assert f.match("~e")
+ assert flowfilter.match(f, "~e")
- tutils.raises(ValueError, f.match, "~")
+ tutils.raises(ValueError, flowfilter.match, f, "~")
class TestState: