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

def test_valid_activation_with_profile(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_profile = self.registration_profile.objects.activate_user(profile.activation_key, Site.objects.get_current(), get_profile=True)
    self.failUnless(isinstance(activated_profile, self.registration_profile))
    self.assertEqual(activated_profile.id, profile.id)
    self.failUnless(activated_profile.activated)
    new_user.refresh_from_db()
    self.assertTrue(activated_profile.user.id, new_user.id)
    self.assertTrue(new_user.is_active)
