aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_flow.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-02-10 15:31:45 +1300
committerAldo Cortesi <aldo@nullcube.com>2012-02-10 15:31:45 +1300
commit1ad7e9152736251203cd9c57c6af3e19a2f7ad8a (patch)
tree48b249d04d4b44486c40518d2e8ea2bd42e89328 /test/test_flow.py
parent5f785e26b9b863d5ab340e0299ae31753cc84dfb (diff)
downloadmitmproxy-1ad7e9152736251203cd9c57c6af3e19a2f7ad8a.tar.gz
mitmproxy-1ad7e9152736251203cd9c57c6af3e19a2f7ad8a.tar.bz2
mitmproxy-1ad7e9152736251203cd9c57c6af3e19a2f7ad8a.zip
Make filter matching act more sensibly.
Diffstat (limited to 'test/test_flow.py')
-rw-r--r--test/test_flow.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/test_flow.py b/test/test_flow.py
index 088a180f..5a8eb0f2 100644
--- a/test/test_flow.py
+++ b/test/test_flow.py
@@ -142,6 +142,10 @@ class uFlow(libpry.AutoTree):
f.request = f.response.request
assert not f.match(filt.parse("~b test"))
assert f.match(None)
+ assert not f.match(filt.parse("~b test"))
+
+ f = tutils.tflow_err()
+ assert f.match(filt.parse("~e"))
def test_backup(self):
f = tutils.tflow()
@@ -304,10 +308,11 @@ class uState(libpry.AutoTree):
req = tutils.treq()
f = c.add_request(req)
e = flow.Error(f.request, "message")
- c.set_limit("~bs message")
+ c.set_limit("~e")
+ assert not c.view
assert not c.view
assert c.add_error(e)
- #assert c.view
+ assert c.view
def test_set_limit(self):
@@ -332,7 +337,7 @@ class uState(libpry.AutoTree):
c.add_request(req)
assert len(c.view) == 2
c.set_limit("~q")
- assert len(c.view) == 1
+ assert len(c.view) == 2
c.set_limit("~s")
assert len(c.view) == 1