Skip to content

Commit

Permalink
Fix get_vehicle_image request
Browse files Browse the repository at this point in the history
  • Loading branch information
rikroe committed Jan 21, 2024
1 parent ed2ffd2 commit 1948711
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bimmer_connected/tests/test_vehicle.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ async def test_vehicle_image(caplog, bmw_fixture: respx.Router):
bmw_fixture.get(
path="/eadrax-ics/v5/presentation/vehicles/images",
params={"carView": "FrontView"},
headers={"accept": "image/png", "bmw-vin": VIN_G01},
headers={"accept": "image/png", "bmw-app-vehicle-type": "connected", "bmw-vin": VIN_G01},
).respond(200, content="png_image")
assert b"png_image" == await vehicle.get_vehicle_image(VehicleViewDirection.FRONT)

Expand Down
2 changes: 1 addition & 1 deletion bimmer_connected/vehicle/vehicle.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,6 @@ async def get_vehicle_image(self, direction: VehicleViewDirection) -> bytes:
response = await client.get(
VEHICLE_IMAGE_URL,
params={"carView": direction.value, "toCrop": True},
headers={"bmw-vin": self.vin, "accept": "image/png"},
headers={"accept": "image/png", "bmw-app-vehicle-type": "connected", "bmw-vin": self.vin},
)
return response.content

0 comments on commit 1948711

Please sign in to comment.