Fix task name, should have dashes not underscores

This commit is contained in:
Rebecca Law
2017-04-06 15:26:50 +01:00
parent 1d46dd0be1
commit a9e429b09f
2 changed files with 2 additions and 2 deletions

View File

@@ -14,6 +14,6 @@ register_errors(letter_job)
@letter_job.route('/send-letter-jobs', methods=['POST'])
def send_letter_jobs():
job_ids = validate(request.get_json(), letter_job_ids)
notify_celery.send_task(name="send_files_to_dvla", args=(job_ids['job_ids'],), queue="process-ftp")
notify_celery.send_task(name="send-files-to-dvla", args=(job_ids['job_ids'],), queue="process-ftp")
return "Task created to send files to DVLA"

View File

@@ -20,7 +20,7 @@ def test_send_letter_jobs(client, mocker):
assert response.status_code == 200
assert response.get_data(as_text=True) == "Task created to send files to DVLA"
mock_celery.assert_called_once_with(name="send_files_to_dvla",
mock_celery.assert_called_once_with(name="send-files-to-dvla",
args=(job_ids['job_ids'],),
queue="process-ftp")