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:
Rebecca Law
2019-08-12 16:51:39 +01:00
parent 9d8e8747d1
commit ae1bc54f9e
6 changed files with 9 additions and 12 deletions

View File

@@ -194,7 +194,7 @@ def test_update_status_of_notifications_after_timeout(notify_api, sample_templat
seconds=current_app.config.get('SENDING_NOTIFICATIONS_TIMEOUT_PERIOD') + 10))
with pytest.raises(NotificationTechnicalFailureException) as e:
timeout_notifications()
assert str(not2.id) in e.value.message
assert str(not2.id) in e.value
assert not1.status == 'temporary-failure'
assert not2.status == 'technical-failure'
assert not3.status == 'temporary-failure'