mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-05 02:41:56 +00:00
test(proxy): assert no-throw durations return None
This commit is contained in:
parent
45ff06c713
commit
7677d83af8
1 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue