def test_send_not_email(self): """ This just tests that if we currently send a non Email notification, sent_recipients doesn't get updated. """ notification = NotificationFactory(type='SMS') notification.send_notification() self.assertEqual(notification.sent_recipients, [])
def test_send_notification(self): old_email_count = Email.objects.count() valid_notification = NotificationFactory() valid_notification.send_notification() six.assertCountEqual(self, valid_notification.recipients, valid_notification.sent_recipients) self.assertEqual(Email.objects.count(), old_email_count + 1)