move contact list json to a constructor

reduces some duplication
This commit is contained in:
Leo Hemsted
2021-09-15 15:57:49 +01:00
parent 9e915703fd
commit 2494d6ce31
3 changed files with 62 additions and 53 deletions

View File

@@ -716,3 +716,28 @@ def broadcast_message_json(
'approved_by_id': approved_by_id,
'cancelled_by_id': cancelled_by_id,
}
def contact_list_json(
*,
id_=None,
created_at='2020-06-13T09:59:56.000000Z',
created_by='Test User',
service_id,
original_file_name='EmergencyContactList.xls',
row_count=100,
recent_job_count=0,
has_jobs=True,
template_type='email',
):
return {
'id': id_ or sample_uuid(),
'created_at': created_at,
'created_by': created_by,
'service_id': service_id,
'original_file_name': original_file_name,
'row_count': row_count,
'recent_job_count': recent_job_count,
'has_jobs': has_jobs,
'template_type': template_type,
}