Fix RM mini 3 update manager (#40215)

This commit is contained in:
Felipe Martins Diel authored and GitHub committed 2020-09-18 15:31:25 +02:00
1 parent 27f11a1022
commit 2f7b6bfa2d
3 files changed
+27 -2

No files matched your search

+3
View File
@@ -95,6 +95,9 @@ class BroadlinkDevice:
with patch(
"homeassistant.components.broadlink.device.blk.gendevice",
return_value=mock_api,
), patch(
"homeassistant.components.broadlink.updater.blk.discover",
return_value=[mock_api],
):
await hass.config_entries.async_setup(mock_entry.entry_id)
await hass.async_block_till_done()
+2 -2
View File
@@ -164,7 +164,7 @@ async def test_device_setup_update_authorization_error(hass):
async def test_device_setup_update_authentication_error(hass):
"""Test we handle an authentication error in the update step."""
device = get_device("Living Room")
device = get_device("Garage")
mock_api = device.get_mock_api()
mock_api.check_sensors.side_effect = blke.AuthorizationError()
mock_api.auth.side_effect = (None, blke.AuthenticationError())
@@ -190,7 +190,7 @@ async def test_device_setup_update_authentication_error(hass):
async def test_device_setup_update_broadlink_exception(hass):
"""Test we handle a Broadlink exception in the update step."""
device = get_device("Living Room")
device = get_device("Garage")
mock_api = device.get_mock_api()
mock_api.check_sensors.side_effect = blke.BroadlinkException()