test(jwt): assert on race-loser's returned key, not only mocks (TQ002)
Some checks are pending
LiteLLM Rust / rust-lint (push) Waiting to run
LiteLLM Rust / rust-test (push) Waiting to run
LiteLLM Rust / rust-wheel (push) Waiting to run
Terraform Modules / fmt, validate, test (aws) (push) Waiting to run
Terraform Modules / fmt, validate, test (gcp) (push) Waiting to run
Terraform Provider / gofmt, vet, build, test (push) Waiting to run
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Waiting to run

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Mrinal Chanshetty 2026-09-25 19:57:44 -04:00
parent 271737336f
commit 1454dbf482

View file

@ -2296,8 +2296,12 @@ async def test_auto_register_map_existing_key_race_loser_keeps_reused_key():
return_value="winner-hash",
),
):
await _auto_register_jwt_mapping(**_auto_register_kwargs(prisma_client, user_api_key_cache, jwt_handler))
result = await _auto_register_jwt_mapping(
**_auto_register_kwargs(prisma_client, user_api_key_cache, jwt_handler)
)
assert result is not None
assert result.org_id == "key-own-org"
prisma_client.db.litellm_verificationtoken.delete.assert_not_awaited()
assert user_api_key_cache.async_set_cache.await_args.kwargs["value"] == "winner-hash"