From 1ad7e9152736251203cd9c57c6af3e19a2f7ad8a Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Fri, 10 Feb 2012 15:31:45 +1300 Subject: Make filter matching act more sensibly. --- test/test_console.py | 2 +- test/test_flow.py | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/test_console.py b/test/test_console.py index 3de9cca4..6db2f994 100644 --- a/test/test_console.py +++ b/test/test_console.py @@ -72,7 +72,7 @@ class uState(libpry.AutoTree): self._add_response(c) self._add_request(c) self._add_response(c) - assert not c.set_limit("~q") + assert not c.set_limit("~s") assert len(c.view) == 3 assert c.focus == 0 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 -- cgit v1.2.3