mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
Don't log address redaction failure when letter sent with test key
This commit is contained in:
@@ -228,7 +228,7 @@ def process_virus_scan_passed(self, filename):
|
||||
new_pdf = sanitise_response.content
|
||||
|
||||
redaction_failed_message = sanitise_response.get("redaction_failed_message")
|
||||
if redaction_failed_message:
|
||||
if redaction_failed_message and not is_test_key:
|
||||
current_app.logger.info('{} for notification id {} ({})'.format(
|
||||
redaction_failed_message, notification.id, filename)
|
||||
)
|
||||
|
||||
@@ -532,10 +532,13 @@ def test_process_letter_task_check_virus_scan_passed_when_redaction_fails(
|
||||
|
||||
assert sample_letter_notification.billable_units == 2
|
||||
assert sample_letter_notification.status == notification_status
|
||||
mock_copy_s3.assert_called_once_with(
|
||||
bucket_name, filename,
|
||||
bucket_name, 'REDACTION_FAILURE/' + filename
|
||||
)
|
||||
if key_type == KEY_TYPE_NORMAL:
|
||||
mock_copy_s3.assert_called_once_with(
|
||||
bucket_name, filename,
|
||||
bucket_name, 'REDACTION_FAILURE/' + filename
|
||||
)
|
||||
else:
|
||||
mock_copy_s3.assert_not_called()
|
||||
|
||||
|
||||
@freeze_time('2018-01-01 18:00')
|
||||
|
||||
Reference in New Issue
Block a user