aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/test_filt.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/test/mitmproxy/test_filt.py b/test/mitmproxy/test_filt.py
index 9fe36b2a..f6c08c67 100644
--- a/test/mitmproxy/test_filt.py
+++ b/test/mitmproxy/test_filt.py
@@ -73,7 +73,7 @@ class TestParsing:
self._dump(a)
-class TestMatching:
+class TestMatchingHTTPFlow:
def req(self):
return tutils.tflow()
@@ -247,6 +247,21 @@ class TestMatching:
assert not self.q("!~c 201 !~c 200", s)
+class TestMatchingTCPFlow:
+
+ def flow(self):
+ return tutils.ttcpflow()
+
+ def err(self):
+ return tutils.ttcpflow(err=True)
+
+ def q(self, q, o):
+ return filt.parse(q)(o)
+
+ def test_ferr(self):
+ e = self.err()
+ assert self.q("~e", e)
+
@patch('traceback.extract_tb')
def test_pyparsing_bug(extract_tb):
"""https://github.com/mitmproxy/mitmproxy/issues/1087"""