mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-05 00:20:43 -04:00
Limit jobs sent from contact list by data retention
On the uploads page we only show jobs which are within a service’s data retention. This commit does the same for when we’re listing the jobs for a contact list. This matches the UI, which says a contact list has been ‘used `<count_of_jobs>` in the last <data_retention> days’
This commit is contained in:
@@ -491,6 +491,21 @@ def test_view_contact_list(
|
||||
service_id=SERVICE_ONE_ID,
|
||||
contact_list_id=fake_uuid,
|
||||
)
|
||||
mock_get_no_jobs.assert_called_once_with(
|
||||
SERVICE_ONE_ID,
|
||||
contact_list_id=fake_uuid,
|
||||
limit_days=7,
|
||||
statuses={
|
||||
'finished',
|
||||
'in progress',
|
||||
'pending',
|
||||
'ready to send',
|
||||
'scheduled',
|
||||
'sending limits exceeded',
|
||||
'sent to dvla',
|
||||
},
|
||||
page=1,
|
||||
)
|
||||
assert normalize_spaces(page.select_one('h1').text) == (
|
||||
'EmergencyContactList.xls'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user