mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
fix pass through rerank requests tests
This commit is contained in:
parent
1a106a4f06
commit
1f3dd43c27
1 changed files with 9 additions and 0 deletions
|
|
@ -25,8 +25,17 @@ async def mock_request(*args, **kwargs):
|
|||
return mock_response
|
||||
|
||||
|
||||
def remove_rerank_route():
|
||||
for route in app.routes:
|
||||
if route.path == "/v1/rerank" and "POST" in route.methods:
|
||||
app.routes.remove(route)
|
||||
print("Rerank route removed successfully")
|
||||
print("ALL Routes on app=", app.routes)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def client():
|
||||
remove_rerank_route() # remove the native rerank route on the litellm proxy - since we're testing the pass through endpoints
|
||||
return TestClient(app)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue