'Test the creation of a new user.
``UserenaSignup.create_inactive_user`` should create a new user that is
not active. The user should get an ``activation_key`` that is used to
set the user as active.
Every user also has a profile, so this method should create an empty
profile.'

def test_create_inactive_user(self):

    new_user = UserenaSignup.objects.create_user(**self.user_info)
    self.assertEqual(new_user.username, self.user_info['username'])
    self.assertEqual(new_user.email, self.user_info['email'])
    self.assertTrue(new_user.check_password(self.user_info['password']))
    self.assertFalse(new_user.is_active)
    self.assertTrue(re.match('^[a-f0-9]{40}$', new_user.userena_signup.activation_key))
    self.assertTrue(get_user_profile(user=new_user))
    self.assertEqual(User.objects.filter(email=self.user_info['email']).count(), 1)
