mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 18:24:20 +00:00
test(test_proxy_server_keys.py): add logic for connecting/disconnecting from http server
This commit is contained in:
parent
b51d98c6e3
commit
5c45e69a5e
1 changed files with 6 additions and 0 deletions
|
@ -29,6 +29,7 @@ from litellm.proxy.proxy_server import (
|
|||
router,
|
||||
save_worker_config,
|
||||
startup_event,
|
||||
shutdown_event,
|
||||
) # Replace with the actual module where your FastAPI router is defined
|
||||
|
||||
filepath = os.path.dirname(os.path.abspath(__file__))
|
||||
|
@ -60,6 +61,11 @@ async def wrapper_startup_event():
|
|||
await startup_event()
|
||||
|
||||
|
||||
@app.on_event("shutdown")
|
||||
async def wrapper_shutdown_event():
|
||||
await shutdown_event()
|
||||
|
||||
|
||||
# Here you create a fixture that will be used by your tests
|
||||
# Make sure the fixture returns TestClient(app)
|
||||
@pytest.fixture(autouse=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue