mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-03 22:55:43 +00:00 
			
		
		
		
	more coverage
This commit is contained in:
		@@ -36,6 +36,15 @@ class BaseNotificationTests(BaseNotificationIntegrationTest):
 | 
				
			|||||||
            def send(self):
 | 
					            def send(self):
 | 
				
			||||||
                """a comment so we do not need a pass"""
 | 
					                """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
 | 
					        # no send / send bulk
 | 
				
			||||||
        with self.assertRaises(NotImplementedError):
 | 
					        with self.assertRaises(NotImplementedError):
 | 
				
			||||||
            FalseNotificationMethod('', '', '', '', )
 | 
					            FalseNotificationMethod('', '', '', '', )
 | 
				
			||||||
@@ -52,6 +61,9 @@ class BaseNotificationTests(BaseNotificationIntegrationTest):
 | 
				
			|||||||
        with self.assertRaises(NotImplementedError):
 | 
					        with self.assertRaises(NotImplementedError):
 | 
				
			||||||
            AnotherFalseNotificationMethod('', '', '', {'name': 1, 'message': 2, }, )
 | 
					            AnotherFalseNotificationMethod('', '', '', {'name': 1, 'message': 2, }, )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # cover faling delivery
 | 
				
			||||||
 | 
					        self._notification_run()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_errors_passing(self):
 | 
					    def test_errors_passing(self):
 | 
				
			||||||
        """ensure that errors do not kill the whole delivery"""
 | 
					        """ensure that errors do not kill the whole delivery"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user