forked from phoenix/litellm-mirror
(ci/cd) proxy:test_add_new_key
This commit is contained in:
parent
40aaac69cc
commit
ae54e6d8b0
1 changed files with 4 additions and 9 deletions
|
@ -52,13 +52,6 @@ save_worker_config(
|
||||||
save=False,
|
save=False,
|
||||||
use_queue=False,
|
use_queue=False,
|
||||||
)
|
)
|
||||||
app = FastAPI()
|
|
||||||
app.include_router(router) # Include your router in the test app
|
|
||||||
|
|
||||||
|
|
||||||
@app.on_event("startup")
|
|
||||||
async def wrapper_startup_event():
|
|
||||||
await startup_event()
|
|
||||||
|
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
@ -87,8 +80,10 @@ def client():
|
||||||
cleanup_router_config_variables() # rest proxy before test
|
cleanup_router_config_variables() # rest proxy before test
|
||||||
|
|
||||||
asyncio.run(initialize(config=config_fp, debug=True))
|
asyncio.run(initialize(config=config_fp, debug=True))
|
||||||
with TestClient(app) as client:
|
app = FastAPI()
|
||||||
yield client
|
app.include_router(router) # Include your router in the test app
|
||||||
|
|
||||||
|
return TestClient(app)
|
||||||
|
|
||||||
|
|
||||||
def test_add_new_key(client):
|
def test_add_new_key(client):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue