mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
test: isolate router callback state
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
e67f98feb1
commit
7b86b7f4cd
1 changed files with 9 additions and 0 deletions
|
|
@ -21,6 +21,7 @@ This file pins both halves of the fix.
|
|||
|
||||
import json
|
||||
from dataclasses import dataclass
|
||||
from typing import Final
|
||||
from unittest.mock import AsyncMock, MagicMock
|
||||
|
||||
import pytest
|
||||
|
|
@ -33,6 +34,14 @@ from litellm.router_utils.pre_call_checks.model_rate_limit_check import ModelRat
|
|||
from litellm.router_utils.pre_call_checks.prompt_caching_deployment_check import PromptCachingDeploymentCheck
|
||||
from litellm.types.router import RetryPolicy, UpdateRouterConfig
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def isolate_litellm_callbacks():
|
||||
callbacks_before: Final = litellm.callbacks.copy()
|
||||
yield
|
||||
litellm.callbacks = callbacks_before
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# UpdateRouterConfig schema membership (LIT-3152 part 1)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue