From 7677d83af8e2791fd6933b2734061df510725791 Mon Sep 17 00:00:00 2001 From: soroush5 Date: Fri, 4 Sep 2026 12:51:49 +0330 Subject: [PATCH] test(proxy): assert no-throw durations return None --- .../proxy/management_endpoints/test_common_utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_litellm/proxy/management_endpoints/test_common_utils.py b/tests/test_litellm/proxy/management_endpoints/test_common_utils.py index 634bb728f0b..b7a7feda69c 100644 --- a/tests/test_litellm/proxy/management_endpoints/test_common_utils.py +++ b/tests/test_litellm/proxy/management_endpoints/test_common_utils.py @@ -1127,12 +1127,12 @@ class TestValidateKeyDuration: """Invalid key-expiry durations must 400, not 500 (#39710).""" def test_none_and_never_expire_sentinel_pass(self): - validate_key_duration(None) - validate_key_duration("-1") + assert validate_key_duration(None) is None + assert validate_key_duration("-1") is None def test_valid_durations_pass(self): - validate_key_duration("7d") - validate_key_duration("1h") + assert validate_key_duration("7d") is None + assert validate_key_duration("1h") is None def test_garbage_durations_raise_400(self): from fastapi import HTTPException