From 115668f43ea5f6ed5ce47ad9de0db2df0bf96ff1 Mon Sep 17 00:00:00 2001 From: "devin-ai-integration[bot]" <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sat, 26 Sep 2026 03:12:13 -0700 Subject: [PATCH] test(proxy_behavior): scope the management proxy fixture to its package so its spend monitor cannot race the spend tests (#43302) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- tests/proxy_behavior/management/conftest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/proxy_behavior/management/conftest.py b/tests/proxy_behavior/management/conftest.py index 255b937bdd3..74db323e7f2 100644 --- a/tests/proxy_behavior/management/conftest.py +++ b/tests/proxy_behavior/management/conftest.py @@ -31,7 +31,7 @@ def _write_minimal_proxy_config() -> str: return f.name -@pytest_asyncio.fixture(scope="session") +@pytest_asyncio.fixture(scope="package") async def proxy_app(): from litellm.proxy import proxy_server from litellm.proxy.proxy_server import ( @@ -67,7 +67,7 @@ async def proxy_app(): yield app -@pytest_asyncio.fixture(scope="session") +@pytest_asyncio.fixture(scope="package") async def proxy_client(proxy_app) -> AsyncIterator[httpx.AsyncClient]: transport = httpx.ASGITransport(app=proxy_app) async with httpx.AsyncClient( @@ -76,7 +76,7 @@ async def proxy_client(proxy_app) -> AsyncIterator[httpx.AsyncClient]: yield client -@pytest_asyncio.fixture(scope="session") +@pytest_asyncio.fixture(scope="package") async def prisma(proxy_app): from litellm.proxy import proxy_server @@ -84,7 +84,7 @@ async def prisma(proxy_app): return proxy_server.prisma_client -@pytest_asyncio.fixture(scope="session") +@pytest_asyncio.fixture(scope="package") async def world(prisma): from .actors import seed_world