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

Method test_basic

test/mitmproxy/test_websocket.py:27–37  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

25
26class TestWebSocketMessage:
27 def test_basic(self):
28 m = websocket.WebSocketMessage(Opcode.TEXT, True, b"foo")
29 m.set_state(m.get_state())
30 assert m.content == b"foo"
31 assert repr(m) == "'foo'"
32 m.type = Opcode.BINARY
33 assert repr(m) == "b'foo'"
34
35 assert not m.dropped
36 m.drop()
37 assert m.dropped
38
39 def test_text(self):
40 txt = websocket.WebSocketMessage(Opcode.TEXT, True, b"foo")

Callers

nothing calls this directly

Calls 3

set_stateMethod · 0.95
get_stateMethod · 0.95
dropMethod · 0.95

Tested by

no test coverage detected