'Test if the full name or username are returned correcly'

def test_get_full_name_or_username(self):

    user = User.objects.get(pk=1)
    profile = get_user_profile(user=user)
    full_name = profile.get_full_name_or_username()
    self.assertEqual(full_name, 'John    Doe')
    user.first_name = ''
    user.last_name = ''
    user.save()
    self.assertEqual(profile.get_full_name_or_username(), 'john')
    userena_settings.USERENA_WITHOUT_USERNAMES = True
    self.assertEqual(profile.get_full_name_or_username(), 'john@example.com')
    userena_settings.USERENA_WITHOUT_USERNAMES = False
