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 bc4879a commit 5ed2291
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test_client_advisor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 1 addition & 10 deletions ClientAdvisor/App/tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 5ed2291

Please sign in to comment.