Change format of the letter response file we expect

We were previously expecting the letter response files to be in the
format of 'NOTIFY.<datetime>.RSP.TXT' but the response files we receive
use '-' in the filenames instead of '.' which was causing an error when
we tried to get the date from the filename.
This commit is contained in:
Katie Smith
2018-03-13 11:47:31 +00:00
parent 79b5a735e2
commit 41a9f5a06e
5 changed files with 20 additions and 20 deletions

View File

@@ -96,12 +96,12 @@ def test_dvla_rs_txt_file_callback_calls_update_letter_notifications_task(client
def test_dvla_rsp_txt_file_callback_calls_update_letter_notifications_task(client, mocker):
update_task = \
mocker.patch('app.notifications.notifications_letter_callback.update_letter_notifications_statuses.apply_async')
data = _sample_sns_s3_callback('NOTIFY.20170823160812.RSP.TXT')
data = _sample_sns_s3_callback('NOTIFY-20170823160812-RSP.TXT')
response = dvla_post(client, data)
assert response.status_code == 200
assert update_task.called
update_task.assert_called_with(['NOTIFY.20170823160812.RSP.TXT'], queue='notify-internal-tasks')
update_task.assert_called_with(['NOTIFY-20170823160812-RSP.TXT'], queue='notify-internal-tasks')
def test_dvla_ack_calls_does_not_call_letter_notifications_task(client, mocker):