Skip to content

Commit d6c69eb

Browse files
committed
Improved WS response checker
1 parent 14a1d9a commit d6c69eb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/test_server_default_views_socket_handler.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@
66

77
def test_socket_handler(thing_ctx, fake_websocket):
88
with thing_ctx.test_request_context():
9-
ws = fake_websocket("", recieve_once=True)
9+
ws = fake_websocket("__unittest", recieve_once=True, close_after=["__unittest_response"])
1010
socket_handler(ws)
11-
# Only responses should be announcing new subscribers
12-
for response in ws.responses:
13-
assert '"message": "Added subscriber' in response
11+
assert "__unittest_response" in ws.responses
1412

1513

1614
### Will need regular updating as new message handlers are added

0 commit comments

Comments
 (0)