mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 19:54:13 +00:00
fix test pass through
This commit is contained in:
parent
0bc67761dc
commit
5adb7e29b9
1 changed files with 4 additions and 1 deletions
|
@ -11,6 +11,7 @@ sys.path.insert(
|
||||||
) # Adds-the parent directory to the system path
|
) # Adds-the parent directory to the system path
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
from unittest.mock import Mock
|
||||||
|
|
||||||
import httpx
|
import httpx
|
||||||
|
|
||||||
|
@ -19,7 +20,9 @@ from litellm.proxy.proxy_server import app, initialize_pass_through_endpoints
|
||||||
|
|
||||||
# Mock the async_client used in the pass_through_request function
|
# Mock the async_client used in the pass_through_request function
|
||||||
async def mock_request(*args, **kwargs):
|
async def mock_request(*args, **kwargs):
|
||||||
return httpx.Response(200, json={"message": "Mocked response"})
|
mock_response = httpx.Response(200, json={"message": "Mocked response"})
|
||||||
|
mock_response.request = Mock(spec=httpx.Request)
|
||||||
|
return mock_response
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue