Skip to content

Commit 9328ea9

Browse files
author
Joel Collins
committed
Fixed imports
1 parent ed4b8fe commit 9328ea9

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

tests/test_server_default_views_socket_handler.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
from labthings.server.default_views.sockets import socket_handler
1+
from labthings.server.default_views.sockets import (
2+
socket_handler,
3+
process_socket_message,
4+
)
25

36

47
def test_socket_handler(thing_ctx, fake_websocket):
@@ -8,3 +11,9 @@ def test_socket_handler(thing_ctx, fake_websocket):
811
# Only responses should be announcing new subscribers
912
for response in ws.responses:
1013
assert '"message": "Added subscriber' in response
14+
15+
16+
### Will need regular updating as new message handlers are added
17+
def test_process_socket_message():
18+
assert process_socket_message("message") is None
19+
assert process_socket_message(None) is None

tests/test_server_sockets.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,3 @@ def ws_view_func(ws):
124124
with ws_client as c:
125125
c.environ_base["HTTP_COOKIE"] = {"key": "value"}
126126
assert c.connect("/", message="hello") == ["hello"]
127-
128-
129-
def test_socket_handler_loop(fake_websocket):
130-
ws = fake_websocket("hello", recieve_once=True)
131-
132-
gsocket.socket_handler_loop(ws)
133-
134-
135-
### Will need regular updating as new message handlers are added
136-
def test_process_socket_message():
137-
assert gsocket.process_socket_message("message") is None
138-
assert gsocket.process_socket_message(None) is None

0 commit comments

Comments
 (0)