Updated unit test

This commit is contained in:
alexjanousekGSA
2025-05-02 11:08:56 -04:00
parent f79bb3d95a
commit 566228d051

View File

@@ -9,14 +9,18 @@ class FakeService:
id = "1234"
# Automatically mock API health check to prevent real HTTP calls during tests
@pytest.fixture(autouse=True)
def _mock_api_health(mocker):
mocker.patch("app.utils.api_health.is_api_down", return_value=False)
@pytest.fixture
def app():
flask_app = Flask(__name__)
ctx = flask_app.app_context()
ctx.push()
yield flask_app
ctx.pop()
@@ -26,10 +30,8 @@ def celery_app(mocker):
app.config["CELERY"] = {"broker_url": "foo"}
app.config["NOTIFY_TRACE_ID_HEADER"] = "Ex-Notify-Request-Id"
request_helper.init_app(app)
ctx = app.app_context()
ctx.push()
yield app
ctx.pop()