fix(test): reload auth_checks module in CLI JWT expiration test

The test was reloading the constants module but not auth_checks, which imports CLI_JWT_EXPIRATION_HOURS at module level. This caused the test to use the old cached value instead of the new environment variable value.
This commit is contained in:
Alexsander Hamir 2026-01-27 12:19:24 -08:00
parent 95796eb846
commit e5b0ac30aa

View file

@ -166,9 +166,12 @@ def test_get_cli_jwt_auth_token_custom_expiration(
import importlib
from litellm import constants
from litellm.proxy.auth import auth_checks
importlib.reload(constants)
# Also reload auth_checks to pick up the new constant value
importlib.reload(auth_checks)
token = ExperimentalUIJWTToken.get_cli_jwt_auth_token(valid_sso_user_defined_values)
token = auth_checks.ExperimentalUIJWTToken.get_cli_jwt_auth_token(valid_sso_user_defined_values)
# Decrypt and verify token contents
decrypted_token = decrypt_value_helper(