mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-27 01:22:18 +00:00
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:
parent
1e6c98334c
commit
115668f43e
1 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue