'Valid activation of an user.
Activation of an user with a valid ``activation_key`` should activate
the user and set a new invalid ``activation_key`` that is defined in
the setting ``USERENA_ACTIVATED``.'

def test_activation_valid(self):

    user = UserenaSignup.objects.create_user(**self.user_info)
    active_user = UserenaSignup.objects.activate_user(user.userena_signup.activation_key)
    profile = get_user_profile(user=active_user)
    self.assertEqual(user, active_user)
    self.assertTrue(active_user.is_active)
    self.assertTrue(('view_profile' in get_perms(active_user, profile)))
    self.assertTrue(('change_profile' in get_perms(active_user, profile)))
    self.assertEqual(active_user.userena_signup.activation_key, userena_settings.USERENA_ACTIVATED)
