'Activating a user within the permitted window makes the
account active, and resets the activation key.'

def test_valid_activation(self):

    new_user = self.registration_profile.objects.create_inactive_user(site=Site.objects.get_current(), **self.user_info)
    profile = self.registration_profile.objects.get(user=new_user)
    activated = self.registration_profile.objects.activate_user(profile.activation_key, Site.objects.get_current())
    self.failUnless(isinstance(activated, UserModel()))
    self.assertEqual(activated.id, new_user.id)
    self.failIf(activated.is_active)
    profile = self.registration_profile.objects.get(user=new_user)
    self.assertTrue(profile.activated)
