[Fix] Correct kwarg name in test_user_api_key_auth tests#24820
[Fix] Correct kwarg name in test_user_api_key_auth tests#24820yuneng-berri merged 1 commit intomainfrom
Conversation
PR #24755 renamed `azure_api_key_header` to `AZURE_AI_API_KEY_header` in the test file but did not update the actual function signatures of `get_api_key()` and `_user_api_key_auth_builder()`, causing TypeError on all affected test cases. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
Greptile SummaryThis PR fixes a test regression introduced by PR #24755, which incorrectly renamed the Key changes:
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| tests/test_litellm/proxy/auth/test_user_api_key_auth.py | Four test call sites corrected to use azure_api_key_header instead of AZURE_AI_API_KEY_header, matching the actual function signatures. No assertions or test logic changed. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[PR 24755 introduced regression] --> B[Tests used AZURE_AI_API_KEY_header kwarg]
B --> C{Function signature check}
C -->|get_api_key uses azure_api_key_header| D[TypeError at runtime]
C -->|_user_api_key_auth_builder uses azure_api_key_header| D
D --> E[This PR reverts to azure_api_key_header]
E --> F[Tests pass successfully]
Reviews (1): Last reviewed commit: "[Fix] Correct kwarg name in test_user_ap..." | Re-trigger Greptile
Summary
Failure Path (Before Fix)
test_get_api_key_with_custom_litellm_key_headerand related tests intest_user_api_key_auth.pyfail withTypeError: get_api_key() got an unexpected keyword argument 'AZURE_AI_API_KEY_header'.PR #24755 renamed
azure_api_key_headertoAZURE_AI_API_KEY_headerin the test file but did not update the actual function signatures ofget_api_key()and_user_api_key_auth_builder(), which still useazure_api_key_header.Fix
Reverts the 4 kwarg name changes in the test file back to
azure_api_key_headerto match the function signatures.Testing
All 6 tests pass.
Type
🐛 Bug Fix
✅ Test