From b566119c8f7e4e4fae7b27f22ad34ec5299d0190 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Fri, 31 Jan 2025 11:51:24 -0800 Subject: [PATCH] update to support status dropdown --- tests/app/job/test_rest.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/tests/app/job/test_rest.py b/tests/app/job/test_rest.py index a12e3db36..68f76fc03 100644 --- a/tests/app/job/test_rest.py +++ b/tests/app/job/test_rest.py @@ -513,10 +513,24 @@ def test_get_recent_notifications_for_job_in_reverse_order_of_job_number( ) assert len(resp["notifications"]) == 13 - assert resp["notifications"][0]["status"] == "failed" - assert resp["notifications"][0]["job_row_number"] == 7 - assert resp["notifications"][1]["status"] == "delivered" - assert resp["notifications"][1]["job_row_number"] == 5 + for n in resp["notifications"]: + print(n) + assert resp["notifications"][0]["status"] == "virus-scan-failed" + assert resp["notifications"][0]["job_row_number"] == 13 + + resp = admin_request.get( + "job.get_recent_notifications_for_service_job", + service_id=main_job.service_id, + job_id=main_job.id, + status=NotificationStatus.DELIVERED + ) + + assert len(resp["notifications"]) == 1 + for n in resp["notifications"]: + print(n) + assert resp["notifications"][0]["status"] == "delivered" + assert resp["notifications"][0]["job_row_number"] == 0 + @pytest.mark.parametrize(