refer to file rather than document

Karl Approved™
This commit is contained in:
Leo Hemsted
2020-01-16 12:11:56 +00:00
parent 99d008b383
commit a16f79896b
3 changed files with 3 additions and 3 deletions

View File

@@ -39,7 +39,7 @@ def get_pdf_for_notification(notification_id):
raise BadRequestError(message="Notification is not a letter")
if notification.status == NOTIFICATION_VIRUS_SCAN_FAILED:
raise BadRequestError(message='Document did not pass the virus scan')
raise BadRequestError(message='File did not pass the virus scan')
if notification.status == NOTIFICATION_TECHNICAL_FAILURE:
raise BadRequestError(message='PDF not available for letters in status {}'.format(notification.status))

View File

@@ -250,7 +250,7 @@ def create_notification(
updated_at = updated_at or datetime.utcnow()
if not one_off and (job is None and api_key is None):
# we didn't specify in test - lets create it
# we did not specify in test - lets create it
api_key = ApiKey.query.filter(ApiKey.service == template.service, ApiKey.key_type == key_type).first()
if not api_key:
api_key = create_api_key(template.service, key_type=key_type)

View File

@@ -703,7 +703,7 @@ def test_get_pdf_for_notification_returns_400_if_pdf_not_found(
@pytest.mark.parametrize('status, expected_message', [
('virus-scan-failed', 'Document did not pass the virus scan'),
('virus-scan-failed', 'File did not pass the virus scan'),
('technical-failure', 'PDF not available for letters in status technical-failure'),
])
def test_get_pdf_for_notification_only_returns_pdf_content_if_right_status(