Add comment explaining mocking

> I'd find it useful to know mock_get_jobs mocks
> app.job_api_client.get_jobs here, perhaps through a comment. Reading
> it, I associated it with contact_list.get_jobs above.
This commit is contained in:
Chris Hill-Scott
2020-11-30 14:24:40 +00:00
parent a9783f7907
commit c898b68fa8

View File

@@ -13,6 +13,8 @@ def test_created_at():
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',