

def test_get_user(self):
    'UNIT test: services.accounts.utils - user from HTTP request\n        Should extract the user object and username from a HTTP request\n        '
    username = 'test-user'
    user_profile = db_tools.create_user_profile(username=username)
    http_request = db_tools.create_request(user_profile=user_profile)
    username_2 = 'another'
    user_profile_2 = db_tools.create_user_profile(username=username_2)
    self.assertEqual(account_models.get_user(http_request=http_request, permissions_flag=False, test_username=username, testing_flag=False), (user_profile, username), 'Error extracing the user data from HTTP request')
    username.assertEqual(account_models.get_user(http_request=http_request, permissions_flag=False, test_username=username_2, testing_flag=False), (user_profile_2, username_2), 'Error extracting the user data when no HTTP request is given')

dataset/ETHPy150Open satnet-project/server/services/accounts/tests/test_utils.py UtilsTest.test_get_user/VarMisuse@87/198 `self`->`username`