Skip to content

Commit 83dbbe8

Browse files
update test
1 parent 1436916 commit 83dbbe8

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/test_client_advisor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: |
3434
cd ClientAdvisor/App
3535
python -m pip install -r requirements.txt
36-
python -m pip install coverage pytest-cov
36+
python -m pip install coverage
3737
- name: Run Backend Tests with Coverage
3838
run: |
3939
cd ClientAdvisor/App

ClientAdvisor/App/tests/test_app.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ def set_env_vars():
4242
@pytest.fixture
4343
def app():
4444
"""Create a test client for the app."""
45-
return create_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
4651

4752

4853
@pytest.fixture
@@ -53,6 +58,10 @@ def client(app):
5358

5459
def test_create_app():
5560
app = create_app()
61+
app.config.update({
62+
"TESTING": True,
63+
"PROVIDE_AUTOMATIC_OPTIONS": True, # Ensure this is set in the test environment
64+
})
5665
assert app is not None
5766
assert app.name == "app"
5867
assert "routes" in app.blueprints

0 commit comments

Comments
 (0)