bitwise and for test supported_features (#58097)
parent
b507b9ebfb
commit
e2303dc713
|
@ -871,7 +871,7 @@ async def test_implemented_percentage(hass, speed_count, percentage_step):
|
||||||
state = hass.states.get("fan.mechanical_ventilation")
|
state = hass.states.get("fan.mechanical_ventilation")
|
||||||
attributes = state.attributes
|
attributes = state.attributes
|
||||||
assert attributes["percentage_step"] == percentage_step
|
assert attributes["percentage_step"] == percentage_step
|
||||||
assert attributes.get("supported_features") or SUPPORT_SET_SPEED
|
assert attributes.get("supported_features") & SUPPORT_SET_SPEED
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("count,domain", [(1, DOMAIN)])
|
@pytest.mark.parametrize("count,domain", [(1, DOMAIN)])
|
||||||
|
@ -939,7 +939,7 @@ async def test_implemented_preset_mode(hass, start_ha):
|
||||||
state = hass.states.get("fan.mechanical_ventilation")
|
state = hass.states.get("fan.mechanical_ventilation")
|
||||||
attributes = state.attributes
|
attributes = state.attributes
|
||||||
assert attributes.get("percentage") is None
|
assert attributes.get("percentage") is None
|
||||||
assert attributes.get("supported_features") or SUPPORT_PRESET_MODE
|
assert attributes.get("supported_features") & SUPPORT_PRESET_MODE
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("count,domain", [(1, DOMAIN)])
|
@pytest.mark.parametrize("count,domain", [(1, DOMAIN)])
|
||||||
|
|
Loading…
Reference in New Issue