mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
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:
parent
95796eb846
commit
e5b0ac30aa
1 changed files with 4 additions and 1 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue