diff --git a/tests/assistants/test_api.py b/tests/assistants/test_api.py index 3f10089b..af73ce86 100644 --- a/tests/assistants/test_api.py +++ b/tests/assistants/test_api.py @@ -2,6 +2,7 @@ import itertools import json import os +import sys from pathlib import Path import httpx @@ -40,7 +41,7 @@ async def test_api_call_error_smoke(mocker, assistant): @pytest.fixture def streaming_server(): port = get_available_port() - base_url = f"http://localhost:{port}" + base_url = f"http://127.0.0.1:{port}" def check_fn(): try: @@ -49,6 +50,8 @@ def check_fn(): return False with BackgroundSubprocess( + sys.executable, + "-m", "uvicorn", f"--app-dir={Path(__file__).parent}", f"--port={port}",