mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-04-30 06:01:06 -04:00
the api returns UTC timestamps, we should keep them as UTC timestamps until the very last moment, and only convert them into BST when we know we want to return to a user (ie: in contact-list.html and other places like that)
25 lines
709 B
Python
25 lines
709 B
Python
from app.models.contact_list import ContactList
|
|
from app.models.job import PaginatedJobs
|
|
|
|
|
|
def test_get_jobs(mock_get_jobs):
|
|
contact_list = ContactList({'id': 'a', 'service_id': 'b'})
|
|
assert isinstance(contact_list.get_jobs(page=123), PaginatedJobs)
|
|
# mock_get_jobs mocks the underlying API client method, not
|
|
# contact_list.get_jobs
|
|
mock_get_jobs.assert_called_once_with(
|
|
'b',
|
|
contact_list_id='a',
|
|
statuses={
|
|
'finished',
|
|
'sending limits exceeded',
|
|
'ready to send',
|
|
'scheduled',
|
|
'sent to dvla',
|
|
'pending',
|
|
'in progress',
|
|
},
|
|
page=123,
|
|
limit_days=None,
|
|
)
|