mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
more coverage
This commit is contained in:
parent
d156e4c431
commit
5567ee432a
@ -36,6 +36,15 @@ class BaseNotificationTests(BaseNotificationIntegrationTest):
|
||||
def send(self):
|
||||
"""a comment so we do not need a pass"""
|
||||
|
||||
class WrongDeliveryImplementation(SingleNotificationMethod):
|
||||
METHOD_NAME = 'WrongDeliveryImplementation'
|
||||
|
||||
def get_targets(self):
|
||||
return [1, ]
|
||||
|
||||
def send(self, target):
|
||||
return False
|
||||
|
||||
# no send / send bulk
|
||||
with self.assertRaises(NotImplementedError):
|
||||
FalseNotificationMethod('', '', '', '', )
|
||||
@ -52,6 +61,9 @@ class BaseNotificationTests(BaseNotificationIntegrationTest):
|
||||
with self.assertRaises(NotImplementedError):
|
||||
AnotherFalseNotificationMethod('', '', '', {'name': 1, 'message': 2, }, )
|
||||
|
||||
# cover faling delivery
|
||||
self._notification_run()
|
||||
|
||||
def test_errors_passing(self):
|
||||
"""ensure that errors do not kill the whole delivery"""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user