示例#1
0
    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_error(self):
        notification = SentNotification()

        with patch.object(NotificationBase, '_send') as mocked__send:
            mocked__send.side_effect = Exception
            result = NotificationBase.resend(notification)
            self.assertFalse(result)
示例#3
0
    def test_resend(self):
        notification = SentNotification()

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

        with patch.object(NotificationBase, '_send') as mocked__send:
            result = NotificationBase.resend(notification)
            self.assertTrue(result)