Skip to content

Commit 689d3c3

Browse files
author
Joel Collins
committed
Coverage for new socket_handler
1 parent aa9fb12 commit 689d3c3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from labthings.server.default_views.sockets import socket_handler
2+
3+
4+
def test_socket_handler(thing_ctx, fake_websocket):
5+
with thing_ctx.test_request_context():
6+
ws = fake_websocket("", recieve_once=True)
7+
socket_handler(ws)
8+
# Expect no response
9+
assert ws.responses == []

0 commit comments

Comments
 (0)