'Test the scenario where user tries to resend activation code
to the expired user\'s email'

def test_resend_activation_email_expired_user(self):

    new_user = self.registration_profile.objects.create_inactive_user(site=Site.objects.get_current(), send_email=False, **self.user_info)
    new_user.date_joined -= datetime.timedelta(days=(settings.ACCOUNT_ACTIVATION_DAYS + 1))
    new_user.save()
    profile = self.registration_profile.objects.get(user=new_user)
    self.assertTrue(profile.activation_key_expired())
    self.assertFalse(self.registration_profile.objects.resend_activation_mail(email=self.user_info['email'], site=Site.objects.get_current()))
    self.assertEqual(len(mail.outbox), 0)
