How to use the smartcar.get_vehicle_ids 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 / tests_e2e / test_smartcar.py View on Github external
def test_get_vehicle_ids(self):
        vehicle_ids = smartcar.get_vehicle_ids(self.access_token)
        self.assertIsNotNone(vehicle_ids)
github smartcar / python-sdk / tests / test_smartcar.py View on Github external
def test_get_vehicle_ids(self):
        query = { 'limit': 11, 'offset': 1 }
        access_token = 'access_token'
        url = smartcar.const.API_URL + '/vehicles?' + urlencode(query)
        responses.add('GET', url, json=self.expected, match_querystring=True)
        actual = smartcar.get_vehicle_ids(access_token, limit=query['limit'], offset=query['offset'])
        self.assertEqual(actual, self.expected)
        self.assertEqual(request().headers['Authorization'], 'Bearer ' + access_token)
github smartcar / python-sdk / tests / tests_e2e / test_vehicle.py View on Github external
def setUpClass(cls):
        super(TestVehicleDisconnectE2E, cls).setUpClass()

        access_object = cls.client.exchange_code(cls.code)

        access_token = access_object['access_token']
        vehicle_ids = smartcar.get_vehicle_ids(access_token)
        cls.vehicle = smartcar.Vehicle(
            vehicle_ids['vehicles'][0],
            access_token)
github smartcar / python-sdk / tests / tests_e2e / test_vehicle.py View on Github external
def setUpClass(cls):
        super(TestVehicleE2E, cls).setUpClass()

        access_object = cls.client.exchange_code(cls.code)

        access_token = access_object['access_token']
        vehicle_ids = smartcar.get_vehicle_ids(access_token)
        cls.vehicle = smartcar.Vehicle(
            vehicle_ids['vehicles'][0],
            access_token)