Skip to content

Commit 5ed2291

Browse files
update test
1 parent bc4879a commit 5ed2291

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

.github/workflows/test_client_advisor.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ jobs:
3737
- name: Run Backend Tests with Coverage
3838
run: |
3939
cd ClientAdvisor/App
40-
coverage run --source=. -m pytest --disable-warnings
41-
coverage report -m
40+
python -m pytest -vv --cov=. --cov-report=xml --cov-report=html --cov-report=term-missing --cov-fail-under=80 --junitxml=coverage-junit.xml
4241
- uses: actions/upload-artifact@v4
4342
with:
4443
name: client-advisor-coverage

ClientAdvisor/App/tests/test_app.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,7 @@ def set_env_vars():
4242
@pytest.fixture
4343
def flaskapp():
4444
"""Create a test client for the app."""
45-
app = create_app()
46-
app.config.update({
47-
"TESTING": True,
48-
"PROVIDE_AUTOMATIC_OPTIONS": True, # Ensure this is set in the test environment
49-
})
50-
return app
45+
return create_app()
5146

5247

5348
@pytest.fixture
@@ -58,10 +53,6 @@ def client(flaskapp):
5853

5954
def test_create_app():
6055
app = create_app()
61-
app.config.update({
62-
"TESTING": True,
63-
"PROVIDE_AUTOMATIC_OPTIONS": True, # Ensure this is set in the test environment
64-
})
6556
assert app is not None
6657
assert app.name == "app"
6758
assert "routes" in app.blueprints

0 commit comments

Comments
 (0)