From e2303dc7135fad056d8c61668d682b048c21ab74 Mon Sep 17 00:00:00 2001 From: Jan Bouwhuis Date: Wed, 20 Oct 2021 15:31:23 +0200 Subject: [PATCH] bitwise and for test supported_features (#58097) --- tests/components/template/test_fan.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/components/template/test_fan.py b/tests/components/template/test_fan.py index 2beb2e6fd2d..8ec771a05f3 100644 --- a/tests/components/template/test_fan.py +++ b/tests/components/template/test_fan.py @@ -871,7 +871,7 @@ async def test_implemented_percentage(hass, speed_count, percentage_step): state = hass.states.get("fan.mechanical_ventilation") attributes = state.attributes 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)]) @@ -939,7 +939,7 @@ async def test_implemented_preset_mode(hass, start_ha): state = hass.states.get("fan.mechanical_ventilation") attributes = state.attributes 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)])