def test_resend_error(self): notification = SentNotification() with patch.object(NotificationBase, '_send') as mocked__send: mocked__send.side_effect = Exception result = NotificationBase.resend(notification) self.assertFalse(result)
def test_resend(self): notification = SentNotification() with patch.object(NotificationBase, '_send') as mocked__send: result = NotificationBase.resend(notification) self.assertTrue(result)