コード例 #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)
コード例 #2
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)
コード例 #3
0
 def test_get_attachments(self):
     self.assertIsNone(NotificationBase().get_attachments())
コード例 #4
0
 def test_private_send(self):
     self.assertRaises(NotImplementedError, NotificationBase()._send, [])
コード例 #5
0
 def test_get_demo_args(self):
     self.assertListEqual(NotificationBase.get_demo_args(), [])
コード例 #6
0
 def test_get_subject(self):
     self.assertIsNone(NotificationBase().get_subject())
コード例 #7
0
 def test_get_sent_from(self):
     self.assertRaises(NotImplementedError,
                       NotificationBase().get_sent_from)
コード例 #8
0
 def test_get_extra_data(self):
     self.assertDictEqual(NotificationBase().get_extra_data(), {})
コード例 #9
0
 def test_get_recipients(self):
     self.assertRaises(NotImplementedError,
                       NotificationBase().get_recipients)
コード例 #10
0
    def test_resend(self):
        notification = SentNotification()

        with patch.object(NotificationBase, '_send') as mocked__send:
            result = NotificationBase.resend(notification)
            self.assertTrue(result)
コード例 #11
0
    def test_resend(self):
        notification = SentNotification()

        with patch.object(NotificationBase, '_send') as mocked__send:
            result = NotificationBase.resend(notification)
            self.assertTrue(result)
コード例 #12
0
 def test_get_demo_args(self):
     self.assertListEqual(NotificationBase.get_demo_args(), [])