From 54561926b920d39bfaa095bd683c2e31d4f7dc1f Mon Sep 17 00:00:00 2001 From: Christophe Bornet Date: Sat, 19 Oct 2024 22:52:56 +0200 Subject: [PATCH] Fix some tests missing client fixture --- ...est_ChatOllama_component.py => test_chatollama_component.py} | 0 src/backend/tests/unit/test_cli.py | 2 +- src/backend/tests/unit/test_database.py | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) rename src/backend/tests/unit/components/models/{test_ChatOllama_component.py => test_chatollama_component.py} (100%) diff --git a/src/backend/tests/unit/components/models/test_ChatOllama_component.py b/src/backend/tests/unit/components/models/test_chatollama_component.py similarity index 100% rename from src/backend/tests/unit/components/models/test_ChatOllama_component.py rename to src/backend/tests/unit/components/models/test_chatollama_component.py diff --git a/src/backend/tests/unit/test_cli.py b/src/backend/tests/unit/test_cli.py index 533f3e98307..796935adb57 100644 --- a/src/backend/tests/unit/test_cli.py +++ b/src/backend/tests/unit/test_cli.py @@ -25,7 +25,7 @@ def test_components_path(runner, default_settings, tmp_path): assert str(temp_dir) in settings_service.settings.components_path -@pytest.mark.usefixtures("session") +@pytest.mark.usefixtures("client") def test_superuser(runner): result = runner.invoke(app, ["superuser"], input="admin\nadmin\n") assert result.exit_code == 0, result.stdout diff --git a/src/backend/tests/unit/test_database.py b/src/backend/tests/unit/test_database.py index d6cdf82b695..4f2d8da5864 100644 --- a/src/backend/tests/unit/test_database.py +++ b/src/backend/tests/unit/test_database.py @@ -513,6 +513,7 @@ async def test_load_flows(client: TestClient): assert response.json()["folder_id"] is not None +@pytest.mark.usefixtures("client") def test_sqlite_pragmas(): db_service = get_db_service()