From 5f785e26b9b863d5ab340e0299ae31753cc84dfb Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Fri, 10 Feb 2012 15:22:26 +1300 Subject: Add filter for detecting flows with errors. Also, remove dependency on weird _is_response method. --- test/test_filt.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'test/test_filt.py') diff --git a/test/test_filt.py b/test/test_filt.py index 4ff7e90e..dfb2b3e1 100644 --- a/test/test_filt.py +++ b/test/test_filt.py @@ -9,7 +9,7 @@ class uParsing(libpry.AutoTree): x.dump(fp=c) assert c.getvalue() - def test_err(self): + def test_parse_err(self): assert filt.parse("~h [") is None def test_simple(self): @@ -99,6 +99,10 @@ class uMatching(libpry.AutoTree): "content_response" ) + def err(self): + q = self.req() + return flow.Error(q, "msg") + def q(self, q, o): return filt.parse(q)(o) @@ -132,6 +136,10 @@ class uMatching(libpry.AutoTree): assert not self.q("~s", q) assert self.q("~s", s) + def test_ferr(self): + e = self.err() + assert self.q("~e", e) + def test_head(self): q = self.req() s = self.resp() -- cgit v1.2.3