mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 17:01:35 -05:00
Update NotificationTechnicalFailureException
- Change the NotificationTechnicalFailureException so that it only inherits from Exception. - The notify_celery task should create the logging message on failure. - Fix unit tests - Remove named parameter when raising exception.
This commit is contained in:
@@ -173,9 +173,7 @@ def test_update_letter_notifications_to_sent_to_dvla_updates_based_on_notificati
|
||||
|
||||
|
||||
def test_update_letter_notifications_to_error_updates_based_on_notification_references(
|
||||
client,
|
||||
sample_letter_template,
|
||||
mocker
|
||||
sample_letter_template
|
||||
):
|
||||
first = create_notification(sample_letter_template, reference='first ref')
|
||||
second = create_notification(sample_letter_template, reference='second ref')
|
||||
@@ -184,7 +182,7 @@ def test_update_letter_notifications_to_error_updates_based_on_notification_refe
|
||||
with freeze_time(dt):
|
||||
with pytest.raises(NotificationTechnicalFailureException) as e:
|
||||
update_letter_notifications_to_error([first.reference])
|
||||
assert first.reference in e.value.message
|
||||
assert first.reference in e.value
|
||||
|
||||
assert first.status == NOTIFICATION_TECHNICAL_FAILURE
|
||||
assert first.sent_by is None
|
||||
|
||||
Reference in New Issue
Block a user