diff options
author | Shadab Zafar <dufferzafar0@gmail.com> | 2016-07-15 16:55:09 +0530 |
---|---|---|
committer | Shadab Zafar <dufferzafar0@gmail.com> | 2016-07-16 10:15:38 +0530 |
commit | 6a2668d8651b52a688ce5771d9a834473d334a64 (patch) | |
tree | b30145fe8a7dd4972b788543692677c6e364fc3a /test | |
parent | 262a42055344b9ece7b94dc8ed762d8a9a8882de (diff) | |
download | mitmproxy-6a2668d8651b52a688ce5771d9a834473d334a64.tar.gz mitmproxy-6a2668d8651b52a688ce5771d9a834473d334a64.tar.bz2 mitmproxy-6a2668d8651b52a688ce5771d9a834473d334a64.zip |
Add ~http and ~tcp filters
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/test_filt.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/mitmproxy/test_filt.py b/test/mitmproxy/test_filt.py index 8330b68c..46e86b57 100644 --- a/test/mitmproxy/test_filt.py +++ b/test/mitmproxy/test_filt.py @@ -87,6 +87,11 @@ class TestMatchingHTTPFlow: def q(self, q, o): return filt.parse(q)(o) + def test_http(self): + s = self.req() + assert self.q("~http", s) + assert not self.q("~tcp", s) + def test_asset(self): s = self.resp() assert not self.q("~a", s) @@ -258,6 +263,11 @@ class TestMatchingTCPFlow: def q(self, q, o): return filt.parse(q)(o) + def test_tcp(self): + f = self.flow() + assert self.q("~tcp", f) + assert not self.q("~http", f) + def test_ferr(self): e = self.err() assert self.q("~e", e) |