From bd9fdd77e99bf994984ca34b98b7b66b8e5f9dee Mon Sep 17 00:00:00 2001 From: jesus Date: Mon, 14 Sep 2026 22:47:04 +0000 Subject: [PATCH] test(alerting): type the _alerted helper Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- tests/test_litellm/proxy/test_proxy_utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test_litellm/proxy/test_proxy_utils.py b/tests/test_litellm/proxy/test_proxy_utils.py index bc86d3311af..94ccc2762c5 100644 --- a/tests/test_litellm/proxy/test_proxy_utils.py +++ b/tests/test_litellm/proxy/test_proxy_utils.py @@ -13,7 +13,7 @@ from litellm.proxy.utils import PrismaClient, ProxyLogging from litellm.types.guardrails import GuardrailEventHooks -from unittest.mock import MagicMock, patch +from unittest.mock import AsyncMock, MagicMock, patch from litellm.proxy.utils import get_custom_url, join_paths @@ -1305,9 +1305,8 @@ class TestPostCallFailureHookLLMExceptionAlerting: client errors must be excluded so a guardrail content-policy block never pages on-call. 5xx proxy errors still alert.""" - async def _alerted(self, exc): + async def _alerted(self, exc: Exception) -> AsyncMock: import asyncio - from unittest.mock import AsyncMock from litellm.proxy._types import AlertType, UserAPIKeyAuth