MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_drop_message

Function test_drop_message

test/mitmproxy/proxy/layers/test_websocket.py:259–271  ·  view source on GitHub ↗
(ws_testdata)

Source from the content-addressed store, hash-verified

257
258
259def test_drop_message(ws_testdata):
260 tctx, playbook, flow = ws_testdata
261 assert (
262 playbook
263 << websocket.WebsocketStartHook(flow)
264 >> reply()
265 >> DataReceived(tctx.server, b"\x81\x03foo")
266 << websocket.WebsocketMessageHook(flow)
267 )
268 flow.websocket.messages[-1].drop()
269 playbook >> reply()
270 playbook << None
271 assert playbook
272
273
274def test_fragmented(ws_testdata):

Callers

nothing calls this directly

Calls 3

replyClass · 0.90
DataReceivedClass · 0.90
dropMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…