From 416d87c01caabfdb7167b2ef9636e8ee69b0b1e4 Mon Sep 17 00:00:00 2001 From: Lars Date: Fri, 22 Oct 2021 17:29:36 +0200 Subject: [PATCH] Fix fritzbox tests (#58227) --- tests/components/fritzbox/test_light.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/components/fritzbox/test_light.py b/tests/components/fritzbox/test_light.py index 5b17e36abb2..24077306647 100644 --- a/tests/components/fritzbox/test_light.py +++ b/tests/components/fritzbox/test_light.py @@ -152,14 +152,14 @@ async def test_update(hass: HomeAssistant, fritz: Mock): assert await setup_config_entry( hass, MOCK_CONFIG[FB_DOMAIN][CONF_DEVICES][0], ENTITY_ID, device, fritz ) - assert device.update.call_count == 1 + assert fritz().update_devices.call_count == 1 assert fritz().login.call_count == 1 next_update = dt_util.utcnow() + timedelta(seconds=200) async_fire_time_changed(hass, next_update) await hass.async_block_till_done() - assert device.update.call_count == 2 + assert fritz().update_devices.call_count == 2 assert fritz().login.call_count == 1 @@ -170,16 +170,16 @@ async def test_update_error(hass: HomeAssistant, fritz: Mock): device.get_colors.return_value = { "Red": [("100", "70", "10"), ("100", "50", "10"), ("100", "30", "10")] } - device.update.side_effect = HTTPError("Boom") + fritz().update_devices.side_effect = HTTPError("Boom") assert not await setup_config_entry( hass, MOCK_CONFIG[FB_DOMAIN][CONF_DEVICES][0], ENTITY_ID, device, fritz ) - assert device.update.call_count == 1 + assert fritz().update_devices.call_count == 1 assert fritz().login.call_count == 1 next_update = dt_util.utcnow() + timedelta(seconds=200) async_fire_time_changed(hass, next_update) await hass.async_block_till_done() - assert device.update.call_count == 2 + assert fritz().update_devices.call_count == 2 assert fritz().login.call_count == 2