Skip to content

armgit / meet

Public Imported from GitHub
0

Open source video conferencing app powered by LiveKit. Built with Django and React.

🧪(backend) fix unreachable assertion after expected exception

lebaudantoine9d01dde9e452
diff --git a/src/backend/core/tests/rooms/test_api_rooms_invite.py b/src/backend/core/tests/rooms/test_api_rooms_invite.py
index 1a9c73ea..3616b55b 100644
--- a/src/backend/core/tests/rooms/test_api_rooms_invite.py
+++ b/src/backend/core/tests/rooms/test_api_rooms_invite.py
@@ -230,15 +230,14 @@ def test_api_rooms_invite_error(mock_invite_to_room):
data = {"emails": ["[email protected]", "[email protected]"]}
- with pytest.raises(InvitationError) as excinfo:
+ with pytest.raises(InvitationError):
client.post(
f"/api/v1.0/rooms/{room.id}/invite/",
json.dumps(data),
content_type="application/json",
)
- mock_invite_to_room.assert_called_once()
- assert "Could not send invitation" in str(excinfo.value)
+ mock_invite_to_room.assert_called_once()
@mock.patch("core.services.invitation.send_mail")