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)
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()
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)
def test_email_sent_to_group_single(self, email_message): message_received_notification(message=self.m2) self.assertEqual(email_message.call_count, 1)
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)
def test_email_sent(self, email_message): message_received_notification(message=self.m) email_message.assert_called_once()