Bump python-broadlink to 0.15.0 (#39228)

* Rename DeviceOfflineError to NetworkTimeoutError

* Bump python-broadlink to 0.15
This commit is contained in:
Felipe Martins Diel authored and GitHub committed 2020-09-26 10:46:02 -05:00
1 parent 6977425d04
commit 2f4aa35ca6
9 files changed
+26 -26

No files matched your search

@@ -249,11 +249,11 @@ async def test_flow_auth_authentication_error(hass):
assert result["errors"] == {"base": "invalid_auth"}
async def test_flow_auth_device_offline(hass):
"""Test we handle a device offline in the auth step."""
async def test_flow_auth_network_timeout(hass):
"""Test we handle a network timeout in the auth step."""
device = get_device("Living Room")
mock_api = device.get_mock_api()
mock_api.auth.side_effect = blke.DeviceOfflineError()
mock_api.auth.side_effect = blke.NetworkTimeoutError()
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
@@ -403,12 +403,12 @@ async def test_flow_unlock_works(hass):
assert mock_api.set_lock.call_count == 1
async def test_flow_unlock_device_offline(hass):
"""Test we handle a device offline in the unlock step."""
async def test_flow_unlock_network_timeout(hass):
"""Test we handle a network timeout in the unlock step."""
device = get_device("Living Room")
mock_api = device.get_mock_api()
mock_api.is_locked = True
mock_api.set_lock.side_effect = blke.DeviceOfflineError
mock_api.set_lock.side_effect = blke.NetworkTimeoutError()
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}