Beispiel #1
0
    def test_no_role_user_receive_mail(self):
        person = Person.objects.create_insoumise(
            "*****@*****.**", create_role=False
        )
        person.save()
        tasks.send_welcome_mail(person.pk, type="LFI")

        self.assertEqual(len(mail.outbox), 1)
Beispiel #2
0
    def test_welcome_mail(self):
        tasks.send_welcome_mail(self.person.pk)

        self.assertEqual(len(mail.outbox), 1)
        self.assertEqual(mail.outbox[0].recipients(), [self.person.email])