From cc476d7a7f8cbad22afc7a38a7df10d6919e1559 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Mon, 11 Aug 2025 12:44:57 -0700 Subject: [PATCH] add tests --- tests/app/celery/test_tasks.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/app/celery/test_tasks.py b/tests/app/celery/test_tasks.py index dbd771b9c..72f414a80 100644 --- a/tests/app/celery/test_tasks.py +++ b/tests/app/celery/test_tasks.py @@ -1856,3 +1856,13 @@ def test_generate_notifications_report_normal_case( assert kwargs["bucket_name"] == "my-bucket" assert kwargs["file_location"] == "some/file/location.csv" assert isinstance(kwargs["filedata"], io.BytesIO) + + +@patch("app.dao.notifications_dao.get_notifications_for_service") +@patch("app.celery.tasks.current_app") +def test_generate_notifications_report_no_notifications( + mock_current_app, mock_get_notifications +): + mock_get_notifications.return_value.items = [] + _generate_notifications_report("service-id", "report-id", 7) + mock_current_app.logger.info.assert_called_with("SKIP service-id")