Merge pull request #1646 from alphagov/add-tags-to-pdf-letters

upload letter pdfs with retention tag
This commit is contained in:
Leo Hemsted
2018-02-12 15:03:53 +00:00
committed by GitHub
5 changed files with 15 additions and 3 deletions

View File

@@ -10,6 +10,7 @@ from celery.exceptions import MaxRetriesExceededError
from requests import RequestException
from sqlalchemy.orm.exc import NoResultFound
from app.variables import Retention
from app.celery.letters_pdf_tasks import (
create_letters_pdf,
get_letters_pdf,
@@ -117,7 +118,8 @@ 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']
region=current_app.config['AWS_REGION'],
tags={Retention.KEY: Retention.ONE_WEEK}
)