mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
Update test_dumper.py
This commit is contained in:
parent
2e9a34faa9
commit
ade136dc4d
@ -155,6 +155,7 @@ class TestContentView:
|
||||
|
||||
def test_tcp():
|
||||
sio = io.StringIO()
|
||||
sio_err = io.StringIO()
|
||||
d = dumper.Dumper(sio)
|
||||
with taddons.context(d) as ctx:
|
||||
ctx.configure(d, flow_detail=3, showhost=True)
|
||||
@ -165,11 +166,12 @@ def test_tcp():
|
||||
|
||||
f = tflow.ttcpflow(client_conn=True, err=True)
|
||||
d.tcp_error(f)
|
||||
assert "Error in TCP" in sio.getvalue()
|
||||
assert "Error in TCP" in sio_err.getvalue()
|
||||
|
||||
|
||||
def test_websocket():
|
||||
sio = io.StringIO()
|
||||
sio_err = io.StringIO()
|
||||
d = dumper.Dumper(sio)
|
||||
with taddons.context(d) as ctx:
|
||||
ctx.configure(d, flow_detail=3, showhost=True)
|
||||
@ -183,4 +185,4 @@ def test_websocket():
|
||||
|
||||
f = tflow.twebsocketflow(client_conn=True, err=True)
|
||||
d.websocket_error(f)
|
||||
assert "Error in WebSocket" in sio.getvalue()
|
||||
assert "Error in WebSocket" in sio_err.getvalue()
|
||||
|
Loading…
Reference in New Issue
Block a user