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>
This commit is contained in:
yucheng 2026-09-18 21:47:32 +00:00
parent 0e74dd2811
commit 2a7dcc77b2

View file

@ -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)