From 2a7dcc77b25ddc77fc842aafad633aa44d42f1ef Mon Sep 17 00:00:00 2001 From: yucheng Date: Fri, 18 Sep 2026 21:47:32 +0000 Subject: [PATCH] test(team): mock the membership upsert the member add now issues on team create Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../proxy/management_endpoints/test_team_endpoints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_litellm/proxy/management_endpoints/test_team_endpoints.py b/tests/test_litellm/proxy/management_endpoints/test_team_endpoints.py index 5a245c96a09..67b8f3bc5f3 100644 --- a/tests/test_litellm/proxy/management_endpoints/test_team_endpoints.py +++ b/tests/test_litellm/proxy/management_endpoints/test_team_endpoints.py @@ -13387,7 +13387,7 @@ async def test_new_team_created_audit_event_carries_the_final_roster(monkeypatch mock_prisma.db.litellm_usertable.update = AsyncMock(return_value=user_row) membership_row = MagicMock() membership_row.model_dump.return_value = {"team_id": "team-audit-roster", "user_id": "alice", "budget_id": None} - mock_prisma.db.litellm_teammembership.create = AsyncMock(return_value=membership_row) + mock_prisma.db.litellm_teammembership.upsert = AsyncMock(return_value=membership_row) mock_prisma.db.litellm_auditlog.create = AsyncMock() _wire_team_create_tx(mock_prisma)