If the notifications that are being deleted are letters then we need to delete the letter from s3 as well.

This commit is contained in:
Rebecca Law
2018-08-08 16:20:25 +01:00
parent 43000b2253
commit d0e9ab4972
6 changed files with 90 additions and 43 deletions

View File

@@ -11,7 +11,6 @@ from requests import RequestException
from sqlalchemy.orm.exc import NoResultFound
from app.errors import VirusScanError
from app.variables import Retention
from app.celery.letters_pdf_tasks import (
create_letters_pdf,
get_letters_pdf,
@@ -112,8 +111,7 @@ def test_create_letters_pdf_calls_s3upload(mocker, sample_letter_notification):
bucket_name=current_app.config['LETTERS_PDF_BUCKET_NAME'],
file_location=filename,
filedata=b'\x00\x01',
region=current_app.config['AWS_REGION'],
tags={Retention.KEY: Retention.ONE_WEEK}
region=current_app.config['AWS_REGION']
)