mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-02-07 02:28:50 +00:00
Add test for error (~e)
This commit is contained in:
parent
17305643bc
commit
88671c3aac
@ -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"""
|
||||
|
Loading…
Reference in New Issue
Block a user