The aexists runs now, so it needs to have the mocked return set

This commit is contained in:
Trenton H
2026-03-12 11:50:16 -07:00
parent b7f54b69e7
commit 943918e896
+1
View File
@@ -129,6 +129,7 @@ class TestWebSockets:
assert await communicator.receive_json_from() == message
# Message not received for different owner with no group match
user.groups.filter.return_value.aexists = mocker.AsyncMock(return_value=False)
message = {"type": "status_update", "data": {"task_id": "test", "owner_id": 2}}
await channel_layer.group_send("status_updates", message)
assert await communicator.receive_nothing()