diff --git a/smartcar/vehicle.py b/smartcar/vehicle.py index 3cc43e8c..60e19a44 100644 --- a/smartcar/vehicle.py +++ b/smartcar/vehicle.py @@ -376,8 +376,7 @@ def set_charge_limit(self, limit) -> types.Status: "POST", url, headers=headers, json={"limit": limit} ) return types.select_named_tuple("set_charge_limit", response) - - + def send_destination(self, latitude, longitude) -> types.Action: """ POST Vehicle.send_destination @@ -391,7 +390,10 @@ def send_destination(self, latitude, longitude) -> types.Action: url = self._format_url("navigation/destination") headers = self._get_headers(need_unit_system=False) response = helpers.requester( - "POST", url, headers=headers, json={"latitude": latitude, "longitude": longitude} + "POST", + url, + headers=headers, + json={"latitude": latitude, "longitude": longitude}, ) return types.select_named_tuple("send_destination", response) diff --git a/tests/conftest.py b/tests/conftest.py index 645ee1e4..3aff5cca 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -157,7 +157,10 @@ def access_ford(client): """ client = sc.AuthClient(*ah.get_auth_client_params()) code = ah.run_auth_flow( - client.get_auth_url(["required:read_charge", "required:control_charge", "control_navigation"]), "FORD" + client.get_auth_url( + ["required:read_charge", "required:control_charge", "control_navigation"] + ), + "FORD", ) access = client.exchange_code(code) yield access diff --git a/tests/e2e/test_vehicle.py b/tests/e2e/test_vehicle.py index 0443a64d..7ddf2dcd 100644 --- a/tests/e2e/test_vehicle.py +++ b/tests/e2e/test_vehicle.py @@ -74,6 +74,7 @@ def test_location(chevy_volt): assert type(location) == types.Location assert location._fields == ("latitude", "longitude", "meta") + def test_attributes(chevy_volt): attributes = chevy_volt.attributes() assert attributes is not None @@ -137,6 +138,7 @@ def test_set_charge_limit(ford_car): assert type(response) == types.Action assert response._fields == ("status", "message", "meta") + def test_send_destination(ford_car): # The latitude and longitude of the Empire State Building in New York, USA. response = ford_car.send_destination(40.748817, -73.985428)