How to use the smartcar.get_user_id function in smartcar

To help you get started, we’ve selected a few smartcar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github smartcar / python-sdk / tests / test_smartcar.py View on Github external
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)
github smartcar / python-sdk / tests / tests_e2e / test_smartcar.py View on Github external
def test_get_user_id(self):
        user_id = smartcar.get_user_id(self.access_token)
        self.assertIsNotNone(user_id)