mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	more coverage
This commit is contained in:
		| @@ -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""" | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user