mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-19 00:01:29 +00:00
test(auth): isolate prefetch assertions from cache expiry
This commit is contained in:
parent
a27feae369
commit
ee08a154bc
1 changed files with 3 additions and 3 deletions
|
|
@ -58,7 +58,7 @@ async def test_join_binds_the_membership_to_the_requested_team(prisma):
|
|||
data={"user_id": user_id, "team_id": team_b, "litellm_budget_table": {"connect": {"budget_id": f"b-{run}"}}}
|
||||
)
|
||||
|
||||
cache = UserApiKeyCache(in_memory_cache=InMemoryCache(), redis_cache=None)
|
||||
cache = UserApiKeyCache(in_memory_cache=InMemoryCache(clock=lambda: 0.0), redis_cache=None)
|
||||
refs = AuthObjectRefs(user_id=user_id, team_id=team_a, membership_user_id=user_id, organization_id=org_id)
|
||||
await prefetch_auth_objects(refs=refs, user_api_key_cache=cache, prisma_client=prisma)
|
||||
|
||||
|
|
@ -100,7 +100,7 @@ async def test_join_reads_team_model_aliases_from_the_mapped_column(prisma):
|
|||
where={"team_id": team_id}, include={"litellm_model_table": True}
|
||||
)
|
||||
|
||||
cache = UserApiKeyCache(in_memory_cache=InMemoryCache(), redis_cache=None)
|
||||
cache = UserApiKeyCache(in_memory_cache=InMemoryCache(clock=lambda: 0.0), redis_cache=None)
|
||||
refs = AuthObjectRefs(user_id=None, team_id=team_id, membership_user_id=None, organization_id=None)
|
||||
await prefetch_auth_objects(refs=refs, user_api_key_cache=cache, prisma_client=prisma)
|
||||
|
||||
|
|
@ -144,7 +144,7 @@ async def test_join_reads_null_nested_lists_the_way_prisma_does(prisma):
|
|||
where={"user_id_team_id": {"user_id": user_id, "team_id": team_id}}, include={"litellm_budget_table": True}
|
||||
)
|
||||
|
||||
cache = UserApiKeyCache(in_memory_cache=InMemoryCache(), redis_cache=None)
|
||||
cache = UserApiKeyCache(in_memory_cache=InMemoryCache(clock=lambda: 0.0), redis_cache=None)
|
||||
refs = AuthObjectRefs(user_id=user_id, team_id=team_id, membership_user_id=user_id, organization_id=None)
|
||||
await prefetch_auth_objects(refs=refs, user_api_key_cache=cache, prisma_client=prisma)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue