diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-10-01 12:44:17 +0200 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-10-03 11:45:54 +0200 |
commit | bb60b76af49eaa904cf3ebd24a4694e2c6f29cae (patch) | |
tree | a4119e480e22d77dc134224d37a72723bca440af /test/mitmproxy/test_flow.py | |
parent | 5f8b8bf35e7a8c434310c93c13871f863f12fecc (diff) | |
download | mitmproxy-bb60b76af49eaa904cf3ebd24a4694e2c6f29cae.tar.gz mitmproxy-bb60b76af49eaa904cf3ebd24a4694e2c6f29cae.tar.bz2 mitmproxy-bb60b76af49eaa904cf3ebd24a4694e2c6f29cae.zip |
use flowfilter.match
Diffstat (limited to 'test/mitmproxy/test_flow.py')
-rw-r--r-- | test/mitmproxy/test_flow.py | 20 |
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: |