diff --git a/.github/workflows/test_client_advisor.yml b/.github/workflows/test_client_advisor.yml index b2556220..52625e1a 100644 --- a/.github/workflows/test_client_advisor.yml +++ b/.github/workflows/test_client_advisor.yml @@ -37,8 +37,7 @@ jobs: - name: Run Backend Tests with Coverage run: | cd ClientAdvisor/App - coverage run --source=. -m pytest --disable-warnings - coverage report -m + python -m pytest -vv --cov=. --cov-report=xml --cov-report=html --cov-report=term-missing --cov-fail-under=80 --junitxml=coverage-junit.xml - uses: actions/upload-artifact@v4 with: name: client-advisor-coverage diff --git a/ClientAdvisor/App/tests/test_app.py b/ClientAdvisor/App/tests/test_app.py index 1e2dffd4..c0202a5b 100644 --- a/ClientAdvisor/App/tests/test_app.py +++ b/ClientAdvisor/App/tests/test_app.py @@ -42,12 +42,7 @@ def set_env_vars(): @pytest.fixture def flaskapp(): """Create a test client for the app.""" - app = create_app() - app.config.update({ - "TESTING": True, - "PROVIDE_AUTOMATIC_OPTIONS": True, # Ensure this is set in the test environment - }) - return app + return create_app() @pytest.fixture @@ -58,10 +53,6 @@ def client(flaskapp): def test_create_app(): app = create_app() - app.config.update({ - "TESTING": True, - "PROVIDE_AUTOMATIC_OPTIONS": True, # Ensure this is set in the test environment - }) assert app is not None assert app.name == "app" assert "routes" in app.blueprints