Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
prvakt committed Jan 10, 2025
1 parent 44a7b20 commit 2f9c9c3
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
31 changes: 31 additions & 0 deletions tests/fixtures/enyaq/air-conditioning-no-steering.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"state": "INVALID",
"chargerConnectionState": "DISCONNECTED",
"chargerLockState": "UNLOCKED",
"timers": [
{
"id": 1,
"enabled": false,
"time": "09:55",
"type": "ONE_OFF",
"selectedDays": [
"SATURDAY"
]
},
{
"id": 2,
"enabled": false,
"time": "00:00",
"type": "ONE_OFF",
"selectedDays": [
"SATURDAY"
]
}
],
"errors": [
{
"type": "UNAVAILABLE_CLIMA_INFORMATION",
"description": "APIs for obtaining air conditioning status are not available"
}
]
}
4 changes: 3 additions & 1 deletion tests/test_rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def load_air_conditioning() -> list[str]:
air_conditioning = []
for path in [
"enyaq/air-conditioning-heating.json",
"enyaq/air-conditioning-no-steering.json",
"other/air-conditioning-idle.json",
"superb/air-conditioning-aux-heater.json",
"superb/air-conditioning-idle.json",
Expand All @@ -122,7 +123,8 @@ async def test_get_air_conditioning(

assert get_status_result.state == air_conditioning_status_json["state"]
assert (
get_status_result.window_heating_state.front
get_status_result.window_heating_state is None
or get_status_result.window_heating_state.front
== air_conditioning_status_json["windowHeatingState"]["front"]
)

Expand Down

0 comments on commit 2f9c9c3

Please sign in to comment.