From d115b5ae707d00dd09bebc7f5e63d4e25cdb1a04 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Fri, 14 Sep 2012 09:41:01 +1200 Subject: Expand Flow.match to accept either a string or a compiled filter expression. --- test/test_flow.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/test_flow.py b/test/test_flow.py index 53d92f25..277d2407 100644 --- a/test/test_flow.py +++ b/test/test_flow.py @@ -171,12 +171,15 @@ class TestFlow: f = tutils.tflow() f.response = tutils.tresp() f.request = f.response.request - assert not f.match(filt.parse("~b test")) + assert not f.match("~b test") assert f.match(None) - assert not f.match(filt.parse("~b test")) + assert not f.match("~b test") f = tutils.tflow_err() - assert f.match(filt.parse("~e")) + assert f.match("~e") + + tutils.raises(ValueError, f.match, "~") + def test_backup(self): f = tutils.tflow() -- cgit v1.2.3