def test_resend_activation_email_activated_user(self):
        user = RegistrationProfile.objects.create_inactive_user(
            site=Site.objects.get_current(), send_email=False, **self.user_info)

        profile = RegistrationProfile.objects.get(user=user)
        activated = (RegistrationProfile.objects
                     .activate_user(profile.activation_key))
        self.assertTrue(activated.is_active)

        self.assertFalse(RegistrationProfile.objects.resend_activation_mail(
            email=self.user_info['email'],
            site=Site.objects.get_current(),
        ))
        self.assertEqual(len(mail.outbox), 0)
Test the scenario where user tries to resend activation code
dataset/ETHPy150Open macropin/django-registration/registration/tests/models.py/RegistrationModelTests.test_resend_activation_email_activated_user