diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-10-03 12:04:17 +0200 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-10-03 12:04:17 +0200 |
commit | 36c04f1631c79ca79712873e151c7f5267cafd46 (patch) | |
tree | d679ebd7d9bec51bca7221cb071a723f6286584b /test | |
parent | bb60b76af49eaa904cf3ebd24a4694e2c6f29cae (diff) | |
download | mitmproxy-36c04f1631c79ca79712873e151c7f5267cafd46.tar.gz mitmproxy-36c04f1631c79ca79712873e151c7f5267cafd46.tar.bz2 mitmproxy-36c04f1631c79ca79712873e151c7f5267cafd46.zip |
fix flowfilter.match args
Diffstat (limited to 'test')
-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 a5a302a5..cc9d2691 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 flowfilter.match(f, "~b test") - assert flowfilter.match(f, None) - assert not flowfilter.match(f, "~b test") + assert not flowfilter.match("~b test", f) + assert flowfilter.match(None, f) + assert not flowfilter.match("~b test", f) f = tutils.tflow(err=True) - assert flowfilter.match(f, "~e") + assert flowfilter.match("~e", f) - tutils.raises(ValueError, flowfilter.match, f, "~") + 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 flowfilter.match(f, "~b nonexistent") - assert flowfilter.match(f, None) - assert not flowfilter.match(f, "~b nonexistent") + assert not flowfilter.match("~b nonexistent", f) + assert flowfilter.match(None, f) + assert not flowfilter.match("~b nonexistent", f) f = tutils.ttcpflow(err=True) - assert flowfilter.match(f, "~e") + assert flowfilter.match("~e", f) - tutils.raises(ValueError, flowfilter.match, f, "~") + tutils.raises(ValueError, flowfilter.match, "~", f) class TestState: |