mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-11 09:28:27 -04:00
Add count of rows in csv file as a notification count.
This commit is contained in:
@@ -7,6 +7,7 @@ def test_client_creates_job_data_correctly(mocker):
|
||||
service_id = str(uuid.uuid4())
|
||||
template_id = 1
|
||||
original_file_name = 'test.csv'
|
||||
notification_count = 1
|
||||
|
||||
expected_data = {
|
||||
"id": job_id,
|
||||
@@ -14,7 +15,8 @@ def test_client_creates_job_data_correctly(mocker):
|
||||
"template": template_id,
|
||||
"original_file_name": original_file_name,
|
||||
"bucket_name": "service-{}-notify".format(service_id),
|
||||
"file_name": "{}.csv".format(job_id)
|
||||
"file_name": "{}.csv".format(job_id),
|
||||
"notification_count": 1
|
||||
}
|
||||
|
||||
expected_url = '/service/{}/job'.format(service_id)
|
||||
@@ -22,6 +24,6 @@ def test_client_creates_job_data_correctly(mocker):
|
||||
client = JobApiClient()
|
||||
mock_post = mocker.patch('app.notify_client.job_api_client.JobApiClient.post')
|
||||
|
||||
client.create_job(job_id, service_id, template_id, original_file_name)
|
||||
client.create_job(job_id, service_id, template_id, original_file_name, notification_count)
|
||||
|
||||
mock_post.assert_called_once_with(url=expected_url, data=expected_data)
|
||||
|
||||
Reference in New Issue
Block a user