From 4b0fd223c8347b4e01fbd46ca4406b660cf21f93 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Mon, 12 May 2025 14:58:41 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(back)=20override=20AI=20feature=20?= =?UTF-8?q?flag=20in=20config=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The env.d/development/common file sets AI_FEATURE_ENABLED=true. When pytest starts it imports these variables, so the /api/v1.0/config endpoint returns AI_FEATURE_ENABLED=True and the test_api_config assertion fails. Explicitly overriding AI_FEATURE_ENABLED=False in test_api_config restores the expected behaviour and makes the whole test-suite green. Signed-off-by: ReinforcedKnowledge --- src/backend/core/tests/test_api_config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backend/core/tests/test_api_config.py b/src/backend/core/tests/test_api_config.py index b91b48f4..b81be32a 100644 --- a/src/backend/core/tests/test_api_config.py +++ b/src/backend/core/tests/test_api_config.py @@ -18,6 +18,7 @@ pytestmark = pytest.mark.django_db @override_settings( + AI_FEATURE_ENABLED=False, COLLABORATION_WS_URL="http://testcollab/", CRISP_WEBSITE_ID="123", FRONTEND_CSS_URL="http://testcss/",