mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 15:37:45 +00:00
fix invididual test coverage
This commit is contained in:
parent
a415c218ea
commit
c0e846b700
@ -26,12 +26,9 @@ def run_tests(src, test, fail):
|
||||
test
|
||||
])
|
||||
|
||||
if e == 0:
|
||||
if fail:
|
||||
if e == 0 and fail:
|
||||
print("FAIL DUE TO UNEXPECTED SUCCESS:", src, "Please remove this file from setup.cfg tool:individual_coverage/exclude.")
|
||||
e = 42
|
||||
else:
|
||||
print("Success:", src)
|
||||
else:
|
||||
if fail:
|
||||
print("Ignoring allowed fail:", src)
|
||||
|
@ -125,8 +125,14 @@ def test_echo_body():
|
||||
d._echo_message(f.response, f)
|
||||
t = sio.getvalue()
|
||||
assert "cut off" in t
|
||||
sio.truncate(0)
|
||||
|
||||
|
||||
def test_echo_trailer():
|
||||
sio = io.StringIO()
|
||||
sio_err = io.StringIO()
|
||||
d = dumper.Dumper(sio, sio_err)
|
||||
with taddons.context(d) as ctx:
|
||||
ctx.configure(d, flow_detail=3)
|
||||
f = tflow.tflow(client_conn=True, server_conn=True, resp=True)
|
||||
f.response.headers["content-type"] = "text/html"
|
||||
f.response.headers["transfer-encoding"] = "chunked"
|
||||
|
Loading…
Reference in New Issue
Block a user