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_vehicle_ids(self):
vehicle_ids = smartcar.get_vehicle_ids(self.access_token)
self.assertIsNotNone(vehicle_ids)
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)
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)
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)