mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
(test) proxy custom logger
This commit is contained in:
parent
3c8c5980d8
commit
f3131f1254
1 changed files with 3 additions and 1 deletions
|
|
@ -20,6 +20,8 @@ import importlib, inspect
|
|||
from fastapi.testclient import TestClient
|
||||
from fastapi import FastAPI
|
||||
from litellm.proxy.proxy_server import router, save_worker_config, initialize # Replace with the actual module where your FastAPI router is defined
|
||||
|
||||
|
||||
filepath = os.path.dirname(os.path.abspath(__file__))
|
||||
config_fp = f"{filepath}/test_configs/test_custom_logger.yaml"
|
||||
python_file_path = f"{filepath}/test_configs/custom_callbacks.py"
|
||||
|
|
@ -31,7 +33,7 @@ async def wrapper_startup_event():
|
|||
initialize(config=config_fp)
|
||||
|
||||
# Use the app fixture in your client fixture
|
||||
@pytest.fixture(autouse=True)
|
||||
@pytest.fixture()
|
||||
def client():
|
||||
with TestClient(app) as client:
|
||||
yield client
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue