test(proxy): assert temp budget increase stops at the exact expiry instant

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
yassin 2026-09-17 19:50:50 +00:00
parent b9d0008d97
commit d9ddc4b901

View file

@ -8477,12 +8477,10 @@ def test_effective_team_member_budget_applies_unexpired_increase() -> None:
def test_effective_team_member_budget_ignores_expired_increase() -> None:
from litellm.proxy.auth.auth_checks import _effective_team_member_budget
budget: Final = LiteLLM_BudgetTable(
max_budget=100.0,
temp_budget_increase=50.0,
temp_budget_expiry=datetime(2020, 1, 1, tzinfo=timezone.utc),
)
expiry: Final = datetime(2020, 1, 1, tzinfo=timezone.utc)
budget: Final = LiteLLM_BudgetTable(max_budget=100.0, temp_budget_increase=50.0, temp_budget_expiry=expiry)
assert _effective_team_member_budget(budget, now=datetime(2026, 1, 1, tzinfo=timezone.utc)) == 100.0
assert _effective_team_member_budget(budget, now=expiry) == 100.0
def test_effective_team_member_budget_without_increase() -> None: