mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-13 08:52:02 +00:00
test(activity): distinguish bounded metadata from key pagination
This commit is contained in:
parent
953a0b8706
commit
382cfe7d02
1 changed files with 5 additions and 2 deletions
|
|
@ -125,8 +125,11 @@ async def test_bounded_activity_routes_keep_exact_totals_and_scoped_permissions(
|
|||
)
|
||||
assert result.status_code == 200, result.text
|
||||
bounded: Final = BoundedDailyActivityResponse.model_validate(result.json())
|
||||
assert bounded.metadata.model_dump(exclude={"api_key_limit"}) == {
|
||||
key: value for key, value in legacy.json()["metadata"].items() if key != "api_key_limit"
|
||||
assert bounded.metadata.entity_total_api_keys is None
|
||||
assert legacy.json()["metadata"]["entity_total_api_keys"] == {owner: 1}
|
||||
pagination_fields: Final = {"api_key_limit", "entity_total_api_keys"}
|
||||
assert bounded.metadata.model_dump(exclude=pagination_fields) == {
|
||||
key: value for key, value in legacy.json()["metadata"].items() if key not in pagination_fields
|
||||
}
|
||||
models: Final = bounded.model_breakdown
|
||||
assert models is not None and models.total_models == 137 and len(models.models) == 20
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue