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

Function test_udp

test/mitmproxy/addons/test_intercept.py:80–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78
79
80async def test_udp():
81 r = intercept.Intercept()
82 with taddons.context(r) as tctx:
83 tctx.configure(r, intercept="~udp")
84 f = tflow.tudpflow()
85 await tctx.cycle(r, f)
86 assert f.intercepted
87
88 tctx.configure(r, intercept_active=False)
89 f = tflow.tudpflow()
90 await tctx.cycle(r, f)
91 assert not f.intercepted
92
93
94async def test_websocket_message():

Callers

nothing calls this directly

Calls 3

contextMethod · 0.80
configureMethod · 0.45
cycleMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…