예제 #1
0
 def test_email_sent_to_group_single(self, email_message):
     with self.settings(ASYNC_SIGNALS=False,
                        NOTIFICATION_ENABLED=True,
                        NOTIFICATIONS_MODULE='pinax.notifications',
                        PINAX_NOTIFICATIONS_QUEUE_ALL=False):
         message_received_notification(message=self.m2)
         self.assertEqual(email_message.call_count, 1)
예제 #2
0
 def test_email_sent(self, email_message):
     with self.settings(ASYNC_SIGNALS=False,
                        NOTIFICATION_ENABLED=True,
                        NOTIFICATIONS_MODULE='pinax.notifications',
                        PINAX_NOTIFICATIONS_QUEUE_ALL=False):
         message_received_notification(message=self.m)
         email_message.assert_called_once()
예제 #3
0
 def test_email_sent_many(self, email_message):
     with self.settings(ASYNC_SIGNALS=False,
                        NOTIFICATION_ENABLED=True,
                        NOTIFICATIONS_MODULE='pinax.notifications',
                        PINAX_NOTIFICATIONS_QUEUE_ALL=False):
         self.p1.email = '*****@*****.**'
         self.p1.save()
         message_received_notification(message=self.m)
         self.assertEqual(email_message.call_count, 2)
예제 #4
0
 def test_email_sent_to_group_single(self, email_message):
     message_received_notification(message=self.m2)
     self.assertEqual(email_message.call_count, 1)
예제 #5
0
 def test_email_sent_to_group(self, email_message):
     self.p1.email = '*****@*****.**'
     self.p1.save()
     message_received_notification(message=self.m2)
     self.assertEqual(email_message.call_count, 2)
예제 #6
0
 def test_email_sent(self, email_message):
     message_received_notification(message=self.m)
     email_message.assert_called_once()