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

Function test_websocket_message

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

Source from the content-addressed store, hash-verified

92
93
94async def test_websocket_message():
95 r = intercept.Intercept()
96 with taddons.context(r) as tctx:
97 tctx.configure(r, intercept='~b "hello binary"')
98 f = tflow.twebsocketflow()
99 await tctx.cycle(r, f)
100 assert f.intercepted
101
102 tctx.configure(r, intercept_active=False)
103 f = tflow.twebsocketflow()
104 await tctx.cycle(r, f)
105 assert not f.intercepted

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…