mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
test(proxy): update team budget helper test for non-mutating return
The _add_team_member_budget_table helper was changed in #36234 to return a model_copy of its input rather than mutating in place. The existing test still asserted result == team_info_response (Pydantic structural equality), which now fails because the returned copy has the budget table set while the original does not. Assert the preserved fields plus the new budget attachment, and add a regression guard that the input response object is not mutated. Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com>
This commit is contained in:
parent
1bafdb3c93
commit
de6e23869c
1 changed files with 3 additions and 2 deletions
|
|
@ -931,9 +931,10 @@ async def test_add_team_member_budget_table_success():
|
|||
team_info_response_object=team_info_response,
|
||||
)
|
||||
|
||||
# Verify the result
|
||||
assert result == team_info_response
|
||||
assert result.team_id == team_info_response.team_id
|
||||
assert result.team_alias == team_info_response.team_alias
|
||||
assert result.team_member_budget_table == mock_budget_record
|
||||
assert team_info_response.team_member_budget_table is None
|
||||
|
||||
# Verify database call was made correctly
|
||||
mock_prisma_client.db.litellm_budgettable.find_unique.assert_called_once_with(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue