MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_empty_message

Function test_empty_message

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

Source from the content-addressed store, hash-verified

242
243
244def test_empty_message(ws_testdata):
245 tctx, playbook, flow = ws_testdata
246 assert (
247 playbook
248 << websocket.WebsocketStartHook(flow)
249 >> reply()
250 >> DataReceived(tctx.server, b"\x81\x00")
251 << websocket.WebsocketMessageHook(flow)
252 )
253 assert flow.websocket.messages[-1].content == b""
254 playbook >> reply()
255 playbook << SendData(tctx.client, b"\x81\x00")
256 assert playbook
257
258
259def test_drop_message(ws_testdata):

Callers

nothing calls this directly

Calls 3

replyClass · 0.90
DataReceivedClass · 0.90
SendDataClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…