Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_get_user_id(self):
access_token = 'access_token'
data = {
'id': 'user_id',
}
url = smartcar.const.API_URL + '/user'
responses.add('GET', url, json=data)
actual = smartcar.get_user_id(access_token)
self.assertEqual(actual, data['id'])
self.assertEqual(request().headers['Authorization'], 'Bearer ' + access_token)
def test_get_user_id(self):
user_id = smartcar.get_user_id(self.access_token)
self.assertIsNotNone(user_id)