mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
Merge pull request #21227 from BerriAI/fix/sso-test-premium-check
Fix SSO test flakiness by correctly mocking premium_user
This commit is contained in:
commit
f555846c83
1 changed files with 5 additions and 0 deletions
|
|
@ -262,6 +262,11 @@ def test_sso_key_generate_shows_deprecation_banner(client_no_auth, monkeypatch):
|
|||
"litellm.proxy.management_endpoints.ui_sso.SSOAuthenticationHandler.should_use_sso_handler",
|
||||
lambda *args, **kwargs: False,
|
||||
)
|
||||
# Mock premium_user to bypass enterprise check (prevents 403 Forbidden)
|
||||
monkeypatch.setattr(
|
||||
"litellm.proxy.proxy_server.premium_user",
|
||||
True,
|
||||
)
|
||||
monkeypatch.setenv("UI_USERNAME", "admin")
|
||||
|
||||
response = client_no_auth.get("/sso/key/generate")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue