forked from phoenix/litellm-mirror
use 1 file for duration_in_seconds
This commit is contained in:
parent
50314a66ca
commit
37462ea55c
8 changed files with 124 additions and 111 deletions
|
@ -17,7 +17,7 @@ import pytest
|
|||
import litellm
|
||||
from litellm.llms.custom_httpx.http_handler import AsyncHTTPHandler, headers
|
||||
from litellm.proxy.utils import (
|
||||
_duration_in_seconds,
|
||||
duration_in_seconds,
|
||||
_extract_from_regex,
|
||||
get_last_day_of_month,
|
||||
)
|
||||
|
@ -556,7 +556,7 @@ def test_extract_from_regex(duration, unit):
|
|||
assert _unit == unit
|
||||
|
||||
|
||||
def test_duration_in_seconds():
|
||||
def testduration_in_seconds():
|
||||
"""
|
||||
Test if duration int is correctly calculated for different str
|
||||
"""
|
||||
|
@ -593,7 +593,7 @@ def test_duration_in_seconds():
|
|||
duration_until_next_month = next_month - current_time
|
||||
expected_duration = int(duration_until_next_month.total_seconds())
|
||||
|
||||
value = _duration_in_seconds(duration="1mo")
|
||||
value = duration_in_seconds(duration="1mo")
|
||||
|
||||
assert value - expected_duration < 2
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue