test that single errors do not kill the whole

This commit is contained in:
Matthias 2021-12-04 17:44:10 +01:00
parent cfd509adb4
commit 13b390d69b
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -52,6 +52,19 @@ class NotificationTests(BaseNotificationIntegrationTest):
with self.assertRaises(NotImplementedError):
AnotherFalseNotificationMethod('', '', '', {'name': 1, 'message': 2, }, )
def test_errors_passing(self):
"""ensure that errors do not kill the whole delivery"""
class ErrorImplementation(SingleNotificationMethod):
METHOD_NAME = 'ErrorImplementation'
def get_targets(self):
return [1, ]
def send(self, target):
raise KeyError('This could be any error')
self._notification_run()
def test_SingleNotificationMethod(self):