From a57cdfddf80392e34f3cb62131d6fbdc1d0fc435 Mon Sep 17 00:00:00 2001 From: "devin-ai-integration[bot]" <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sat, 3 Oct 2026 18:31:48 +0000 Subject: [PATCH] fix(ci): give the pass-through auth regression test a real FastAPI app (#44403) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../pass_through_endpoints/test_passthrough_auth_default.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unit/proxy/pass_through_endpoints/test_passthrough_auth_default.py b/tests/unit/proxy/pass_through_endpoints/test_passthrough_auth_default.py index 44a75c362e5..676934ba3e0 100644 --- a/tests/unit/proxy/pass_through_endpoints/test_passthrough_auth_default.py +++ b/tests/unit/proxy/pass_through_endpoints/test_passthrough_auth_default.py @@ -23,6 +23,7 @@ from unittest.mock import AsyncMock, MagicMock import pytest from fastapi import FastAPI +from fastapi.routing import APIRoute from litellm.proxy._types import PassThroughGenericEndpoint @@ -61,7 +62,7 @@ async def test_register_passthrough_with_auth_true_works_for_oss(monkeypatch): # Regression: setting ``auth: true`` used to raise at startup # unless ``premium_user`` was True, leaving OSS with no safe # configuration. - app = MagicMock(spec=FastAPI) + app = FastAPI() visited: set = set() endpoint = PassThroughGenericEndpoint( @@ -77,6 +78,7 @@ async def test_register_passthrough_with_auth_true_works_for_oss(monkeypatch): premium_user=False, visited_endpoints=visited, ) + assert [route.path for route in app.routes if isinstance(route, APIRoute)] == ["/forwarder"] @pytest.mark.asyncio