mirror of
https://github.com/home-assistant/core.git
synced 2025-07-12 07:47:08 +00:00
Fix fritzbox tests
This commit is contained in:
parent
5b886d48cf
commit
1dff94e29c
@ -152,7 +152,7 @@ async def test_turn_on(hass: HomeAssistant, fritz: Mock) -> None:
|
||||
{ATTR_ENTITY_ID: ENTITY_ID, ATTR_BRIGHTNESS: 100, ATTR_COLOR_TEMP_KELVIN: 3000},
|
||||
True,
|
||||
)
|
||||
assert device.set_LightState.On.call_count == 1
|
||||
assert device.set_state_on.call_count == 1
|
||||
assert device.set_level.call_count == 1
|
||||
assert device.set_color_temp.call_count == 1
|
||||
assert device.set_color_temp.call_args_list == [call(3000)]
|
||||
@ -175,7 +175,7 @@ async def test_turn_on_color(hass: HomeAssistant, fritz: Mock) -> None:
|
||||
{ATTR_ENTITY_ID: ENTITY_ID, ATTR_BRIGHTNESS: 100, ATTR_HS_COLOR: (100, 70)},
|
||||
True,
|
||||
)
|
||||
assert device.set_LightState.On.call_count == 1
|
||||
assert device.set_state_on.call_count == 1
|
||||
assert device.set_level.call_count == 1
|
||||
assert device.set_unmapped_color.call_count == 1
|
||||
assert device.set_level.call_args_list == [call(100)]
|
||||
@ -209,7 +209,7 @@ async def test_turn_on_color_unsupported_api_method(
|
||||
{ATTR_ENTITY_ID: ENTITY_ID, ATTR_BRIGHTNESS: 100, ATTR_HS_COLOR: (100, 70)},
|
||||
True,
|
||||
)
|
||||
assert device.set_LightState.On.call_count == 1
|
||||
assert device.set_state_on.call_count == 1
|
||||
assert device.set_level.call_count == 1
|
||||
assert device.set_color.call_count == 1
|
||||
assert device.set_level.call_args_list == [call(100)]
|
||||
@ -239,7 +239,7 @@ async def test_turn_off(hass: HomeAssistant, fritz: Mock) -> None:
|
||||
await hass.services.async_call(
|
||||
LIGHT_DOMAIN, SERVICE_TURN_OFF, {ATTR_ENTITY_ID: ENTITY_ID}, True
|
||||
)
|
||||
assert device.set_LightState.Off.call_count == 1
|
||||
assert device.set_state_off.call_count == 1
|
||||
|
||||
|
||||
async def test_update(hass: HomeAssistant, fritz: Mock) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user