Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

test(auth): freeze prefetch cache clock so the org getter cannot miss on a slow runner

Shivi Jainf4e21430c09d
diff --git a/tests/proxy_behavior/auth/test_auth_object_prefetch.py b/tests/proxy_behavior/auth/test_auth_object_prefetch.py
index 59e9585a296..cfa958500af 100644
--- a/tests/proxy_behavior/auth/test_auth_object_prefetch.py
+++ b/tests/proxy_behavior/auth/test_auth_object_prefetch.py
@@ -66,6 +66,7 @@ async def test_join_binds_the_membership_to_the_requested_team(prisma):
cache = _frozen_cache()
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)
+ assert cache.in_memory_cache.get_cache(f"org_id:{org_id}") is not None
dead_db = _dead_db()
membership = await get_team_membership(