MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_udp

Function test_udp

test/mitmproxy/addons/test_save.py:50–65  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

48
49
50def test_udp(tmp_path):
51 sa = save.Save()
52 with taddons.context(sa) as tctx:
53 p = str(tmp_path / "foo")
54 tctx.configure(sa, save_stream_file=p)
55
56 tt = tflow.tudpflow()
57 sa.udp_start(tt)
58 sa.udp_end(tt)
59
60 tt = tflow.tudpflow()
61 sa.udp_start(tt)
62 sa.udp_error(tt)
63
64 tctx.configure(sa, save_stream_file=None)
65 assert len(rd(p)) == 2
66
67
68def test_dns(tmp_path):

Callers

nothing calls this directly

Calls 6

udp_startMethod · 0.95
udp_endMethod · 0.95
udp_errorMethod · 0.95
contextMethod · 0.80
rdFunction · 0.70
configureMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…