Fix consider-using-dict-items warnings in tests (#119497)
This commit is contained in:
parent
cb39d2d16b
commit
99b349fa2c
13 changed files with 60 additions and 68 deletions
|
@ -23,7 +23,7 @@ async def test_create_sensors(hass: HomeAssistant) -> None:
|
|||
# Only test for a subset of attributes in case
|
||||
# HA changes the implementation and a new one appears
|
||||
assert all(
|
||||
state.attributes[key] == expected_attributes[key] for key in expected_attributes
|
||||
state.attributes[key] == value for key, value in expected_attributes.items()
|
||||
)
|
||||
|
||||
state = hass.states.get("sensor.nick_office_zone_setpoint_status")
|
||||
|
@ -35,7 +35,7 @@ async def test_create_sensors(hass: HomeAssistant) -> None:
|
|||
# Only test for a subset of attributes in case
|
||||
# HA changes the implementation and a new one appears
|
||||
assert all(
|
||||
state.attributes[key] == expected_attributes[key] for key in expected_attributes
|
||||
state.attributes[key] == value for key, value in expected_attributes.items()
|
||||
)
|
||||
|
||||
state = hass.states.get("sensor.nick_office_zone_status")
|
||||
|
@ -48,7 +48,7 @@ async def test_create_sensors(hass: HomeAssistant) -> None:
|
|||
# Only test for a subset of attributes in case
|
||||
# HA changes the implementation and a new one appears
|
||||
assert all(
|
||||
state.attributes[key] == expected_attributes[key] for key in expected_attributes
|
||||
state.attributes[key] == value for key, value in expected_attributes.items()
|
||||
)
|
||||
|
||||
state = hass.states.get("sensor.master_suite_air_cleaner_mode")
|
||||
|
@ -61,7 +61,7 @@ async def test_create_sensors(hass: HomeAssistant) -> None:
|
|||
# Only test for a subset of attributes in case
|
||||
# HA changes the implementation and a new one appears
|
||||
assert all(
|
||||
state.attributes[key] == expected_attributes[key] for key in expected_attributes
|
||||
state.attributes[key] == value for key, value in expected_attributes.items()
|
||||
)
|
||||
|
||||
state = hass.states.get("sensor.master_suite_current_compressor_speed")
|
||||
|
@ -75,7 +75,7 @@ async def test_create_sensors(hass: HomeAssistant) -> None:
|
|||
# Only test for a subset of attributes in case
|
||||
# HA changes the implementation and a new one appears
|
||||
assert all(
|
||||
state.attributes[key] == expected_attributes[key] for key in expected_attributes
|
||||
state.attributes[key] == value for key, value in expected_attributes.items()
|
||||
)
|
||||
|
||||
state = hass.states.get("sensor.master_suite_outdoor_temperature")
|
||||
|
@ -90,7 +90,7 @@ async def test_create_sensors(hass: HomeAssistant) -> None:
|
|||
# Only test for a subset of attributes in case
|
||||
# HA changes the implementation and a new one appears
|
||||
assert all(
|
||||
state.attributes[key] == expected_attributes[key] for key in expected_attributes
|
||||
state.attributes[key] == value for key, value in expected_attributes.items()
|
||||
)
|
||||
|
||||
state = hass.states.get("sensor.master_suite_humidity")
|
||||
|
@ -105,7 +105,7 @@ async def test_create_sensors(hass: HomeAssistant) -> None:
|
|||
# Only test for a subset of attributes in case
|
||||
# HA changes the implementation and a new one appears
|
||||
assert all(
|
||||
state.attributes[key] == expected_attributes[key] for key in expected_attributes
|
||||
state.attributes[key] == value for key, value in expected_attributes.items()
|
||||
)
|
||||
|
||||
state = hass.states.get("sensor.master_suite_requested_compressor_speed")
|
||||
|
@ -119,7 +119,7 @@ async def test_create_sensors(hass: HomeAssistant) -> None:
|
|||
# Only test for a subset of attributes in case
|
||||
# HA changes the implementation and a new one appears
|
||||
assert all(
|
||||
state.attributes[key] == expected_attributes[key] for key in expected_attributes
|
||||
state.attributes[key] == value for key, value in expected_attributes.items()
|
||||
)
|
||||
|
||||
state = hass.states.get("sensor.master_suite_system_status")
|
||||
|
@ -132,5 +132,5 @@ async def test_create_sensors(hass: HomeAssistant) -> None:
|
|||
# Only test for a subset of attributes in case
|
||||
# HA changes the implementation and a new one appears
|
||||
assert all(
|
||||
state.attributes[key] == expected_attributes[key] for key in expected_attributes
|
||||
state.attributes[key] == value for key, value in expected_attributes.items()
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue