mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-03 02:22:24 +00:00
test: also assert updated models in team-cache-refresh pin
Strengthens the LIT-3244 regression test to also assert `call_kwargs["team_table"].models` matches the updated row, not just `team_id`. Both `existing_team` and `updated_team` share `team_id` in the test setup, so the previous assertion would have passed even if the implementation accidentally cached the pre-mutation row. Greptile review feedback.
This commit is contained in:
parent
a7feddba43
commit
e5d63af402
1 changed files with 8 additions and 1 deletions
|
|
@ -1629,8 +1629,15 @@ async def test_team_model_add_delete_refresh_team_cache(endpoint_name):
|
|||
call_kwargs = mock_cache_team.await_args.kwargs
|
||||
assert call_kwargs["team_id"] == "team-1234"
|
||||
# The cached object must be built from the *updated* row, not the
|
||||
# pre-mutation `existing_team` — that's the whole point.
|
||||
# pre-mutation `existing_team` — that's the whole point. Both rows
|
||||
# share team_id, so the only assertion that actually pins this is
|
||||
# against the field that differs between them: `models`.
|
||||
assert call_kwargs["team_table"].team_id == "team-1234"
|
||||
assert call_kwargs["team_table"].models == [
|
||||
"bedrock-claude-sonnet-4",
|
||||
"openai/*",
|
||||
"team-byok-1",
|
||||
]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue