Missed a unit test update

This commit is contained in:
Alex Janousek
2025-09-26 14:36:50 -04:00
parent 2ba2ba6f86
commit 7f270879d6

View File

@@ -46,25 +46,14 @@ def test_poll_status_notification_update_logic(
job is finished (regardless of count) job is finished (regardless of count)
""" """
total = delivered + failed + pending total = delivered + failed + pending
job_status = "finished" if finished else "sending"
mock_job = mocker.patch("app.job_api_client.get_job") mock_job_status = mocker.patch("app.job_api_client.get_job_status")
mock_job.return_value = { mock_job_status.return_value = {
"data": { "sent_count": delivered,
**job_json( "failed_count": failed,
service_one["id"], "pending_count": pending,
created_by=user_json(), "total_count": total,
job_id=fake_uuid, "processing_finished": finished,
job_status=job_status,
notification_count=total,
notifications_requested=total,
),
"statistics": [
{"status": "delivered", "count": delivered},
{"status": "failed", "count": failed},
{"status": "pending", "count": pending},
],
}
} }
response = client_request.get_response( response = client_request.get_response(
@@ -107,23 +96,13 @@ def test_poll_status_provides_required_fields(
fake_uuid, fake_uuid,
): ):
"""Verify poll status endpoint returns all fields needed for notification update logic.""" """Verify poll status endpoint returns all fields needed for notification update logic."""
mock_job = mocker.patch("app.job_api_client.get_job") mock_job_status = mocker.patch("app.job_api_client.get_job_status")
mock_job.return_value = { mock_job_status.return_value = {
"data": { "sent_count": 15,
**job_json( "failed_count": 5,
service_one["id"], "pending_count": 5,
created_by=user_json(), "total_count": 25,
job_id=fake_uuid, "processing_finished": False,
job_status="sending",
notification_count=25,
notifications_requested=25,
),
"statistics": [
{"status": "delivered", "count": 15},
{"status": "failed", "count": 5},
{"status": "pending", "count": 5},
],
}
} }
response = client_request.get_response( response = client_request.get_response(