From bde95a58701456a8e913db791b721db02c54f9e9 Mon Sep 17 00:00:00 2001 From: phact Date: Tue, 7 Oct 2025 04:02:39 -0400 Subject: [PATCH] fix tests --- tests/integration/test_api_endpoints.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/integration/test_api_endpoints.py b/tests/integration/test_api_endpoints.py index fa36dc8b..1d325a1b 100644 --- a/tests/integration/test_api_endpoints.py +++ b/tests/integration/test_api_endpoints.py @@ -64,15 +64,16 @@ async def test_upload_and_search_endpoint(tmp_path: Path, disable_langflow_inges "src.main", "api", # Clear the api package itself "src.api", + "services", # Clear services that import clients + "src.services", + "services.search_service", + "src.services.search_service", ]: sys.modules.pop(mod, None) from src.main import create_app, startup_tasks import src.api.router as upload_router from src.config.settings import clients, INDEX_NAME, DISABLE_INGEST_WITH_LANGFLOW - # Verify settings loaded correctly - print(f"Settings DISABLE_INGEST_WITH_LANGFLOW: {DISABLE_INGEST_WITH_LANGFLOW}") - # Ensure a clean index before startup await clients.initialize() try: @@ -188,15 +189,16 @@ async def test_router_upload_ingest_traditional(tmp_path: Path, disable_langflow "src.main", "api", # Clear the api package itself "src.api", + "services", # Clear services that import clients + "src.services", + "services.search_service", + "src.services.search_service", ]: sys.modules.pop(mod, None) from src.main import create_app, startup_tasks import src.api.router as upload_router from src.config.settings import clients, INDEX_NAME, DISABLE_INGEST_WITH_LANGFLOW - # Verify settings loaded correctly - print(f"Settings DISABLE_INGEST_WITH_LANGFLOW: {DISABLE_INGEST_WITH_LANGFLOW}") - # Ensure a clean index before startup await clients.initialize() try: