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

@@ -112,7 +112,7 @@ def test_failure_firetext_callback(phone_number):
def test_create_fake_letter_response_file_uploads_response_file_s3(
notify_api, mocker):
mock_s3upload = mocker.patch('app.celery.research_mode_tasks.s3upload')
filename = 'NOTIFY.20180125140000.RSP.TXT'
filename = 'NOTIFY-20180125140000-RSP.TXT'
with requests_mock.Mocker() as request_mock:
request_mock.post(
@@ -135,7 +135,7 @@ def test_create_fake_letter_response_file_uploads_response_file_s3(
def test_create_fake_letter_response_file_calls_dvla_callback_on_development(
notify_api, mocker):
mocker.patch('app.celery.research_mode_tasks.s3upload')
filename = 'NOTIFY.20180125140000.RSP.TXT'
filename = 'NOTIFY-20180125140000-RSP.TXT'
with set_config_values(notify_api, {
'NOTIFY_ENVIRONMENT': 'development'