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>
This commit is contained in:
devin-ai-integration[bot] 2026-09-26 03:12:13 -07:00 • committed by GitHub
parent 1e6c98334c
commit 115668f43e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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