aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/test/tflow.py
diff options
context:
space:
mode:
Diffstat (limited to 'mitmproxy/test/tflow.py')
-rw-r--r--mitmproxy/test/tflow.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mitmproxy/test/tflow.py b/mitmproxy/test/tflow.py
index a5670538..6d330840 100644
--- a/mitmproxy/test/tflow.py
+++ b/mitmproxy/test/tflow.py
@@ -1,3 +1,4 @@
+from mitmproxy.net import websockets
from mitmproxy.test import tutils
from mitmproxy import tcp
from mitmproxy import websocket
@@ -70,8 +71,8 @@ def twebsocketflow(client_conn=True, server_conn=True, messages=True, err=None,
if messages is True:
messages = [
- websocket.WebSocketBinaryMessage(f, True, b"hello binary"),
- websocket.WebSocketTextMessage(f, False, "hello text".encode()),
+ websocket.WebSocketMessage(websockets.OPCODE.BINARY, True, b"hello binary"),
+ websocket.WebSocketMessage(websockets.OPCODE.TEXT, False, "hello text".encode()),
]
if err is True:
err = terr()