From 3457553b3a58552b07bfa4099df97d46cc26ced3 Mon Sep 17 00:00:00 2001 From: Sylvain Leclerc Date: Fri, 11 Oct 2024 16:32:52 +0200 Subject: [PATCH] fix: tests Signed-off-by: Sylvain Leclerc --- tests/integration/test_run_server.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/integration/test_run_server.py b/tests/integration/test_run_server.py index 84063fe..06566ef 100644 --- a/tests/integration/test_run_server.py +++ b/tests/integration/test_run_server.py @@ -1,8 +1,9 @@ -import httpx # type: ignore -import subprocess import socket +import subprocess import time +import requests # type: ignore + SPAWN_TIMEOUT = 10 """Timeout in seconds to wait for the server process to start.""" @@ -67,7 +68,7 @@ def test_server_health(antares_web_server_paths): else: raise RuntimeError("The server did not start in time.") - res = httpx.get("http://localhost:8080/health", timeout=0.25) + res = requests.get("http://localhost:8080/health", timeout=0.25) assert res.status_code == 200, res.json() assert res.json() == {"status": "available"}