Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
AjitPadhi-Microsoft committed Nov 15, 2024
1 parent 1436916 commit 83dbbe8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_client_advisor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: |
cd ClientAdvisor/App
python -m pip install -r requirements.txt
python -m pip install coverage pytest-cov
python -m pip install coverage
- name: Run Backend Tests with Coverage
run: |
cd ClientAdvisor/App
Expand Down
11 changes: 10 additions & 1 deletion ClientAdvisor/App/tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ def set_env_vars():
@pytest.fixture
def app():
"""Create a test client for the app."""
return create_app()
app = create_app()
app.config.update({
"TESTING": True,
"PROVIDE_AUTOMATIC_OPTIONS": True, # Ensure this is set in the test environment
})
return app


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

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
Expand Down

0 comments on commit 83dbbe8

Please sign in to comment.