'An expired account can\'t be activated.'

def test_activation_expired(self):

    resp = self.client.post(reverse('registration_register'), data={'username': 'bob', 'email': 'bob@example.com', 'password1': 'secret', 'password2': 'secret'})
    profile = self.registration_profile.objects.get(user__username='bob')
    user = profile.user
    user.date_joined -= datetime.timedelta(days=settings.ACCOUNT_ACTIVATION_DAYS)
    user.save()
    resp = self.client.get(reverse('registration_activate', args=(), kwargs={'activation_key': profile.activation_key}))
    self.assertEqual(200, resp.status_code)
    self.assertTemplateUsed(resp, 'registration/activate.html')
    user = UserModel().objects.get(username='bob')
    self.assertFalse(user.is_active)
