MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / test_http_connect_error

Function test_http_connect_error

test/mitmproxy/addons/test_dumper.py:284–297  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

282
283
284def test_http_connect_error():
285 sio = io.StringIO()
286 d = dumper.Dumper(sio)
287 with taddons.context(d) as ctx:
288 ctx.configure(d, flow_detail=1)
289 f = tflow.tflow(resp=tutils.tresp(status_code=502, reason=b"Bad Gateway"))
290 d.http_connect_error(f)
291 assert sio.getvalue()
292 assert "502" in sio.getvalue()
293 sio.truncate(0)
294
295 ctx.configure(d, flow_detail=0)
296 d.http_connect_error(f)
297 assert not sio.getvalue()
298
299
300def test_http2():

Callers

nothing calls this directly

Calls 4

http_connect_errorMethod · 0.95
contextMethod · 0.80
getvalueMethod · 0.80
configureMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…