MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_fragmented

Function test_fragmented

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

Source from the content-addressed store, hash-verified

272
273
274def test_fragmented(ws_testdata):
275 tctx, playbook, flow = ws_testdata
276 assert (
277 playbook
278 << websocket.WebsocketStartHook(flow)
279 >> reply()
280 >> DataReceived(tctx.server, b"\x01\x03foo")
281 >> DataReceived(tctx.server, b"\x80\x03bar")
282 << websocket.WebsocketMessageHook(flow)
283 >> reply()
284 << SendData(tctx.client, b"\x01\x03foo")
285 << SendData(tctx.client, b"\x80\x03bar")
286 )
287 assert flow.websocket.messages[-1].content == b"foobar"
288
289
290def test_unfragmented(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…