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

@@ -123,7 +123,7 @@ def firetext_callback(notification_id, to):
def create_fake_letter_response_file(self, reference):
now = datetime.utcnow()
dvla_response_data = '{}|Sent|0|Sorted'.format(reference)
upload_file_name = 'NOTIFY.{}.RSP.TXT'.format(now.strftime('%Y%m%d%H%M%S'))
upload_file_name = 'NOTIFY-{}-RSP.TXT'.format(now.strftime('%Y%m%d%H%M%S'))
s3upload(
filedata=dvla_response_data,