Upgrade black to 20.8b1 (#39287)
This commit is contained in:
1 parent
0d7eec710c
commit
1c2ebdf307
574 files changed
+4389
-1725
No files matched your search
@@ -136,7 +136,8 @@ async def test_update_address(hass):
|
||||
assert gateway.api.host == "1.2.3.4"
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.deconz.async_setup_entry", return_value=True,
|
||||
"homeassistant.components.deconz.async_setup_entry",
|
||||
return_value=True,
|
||||
) as mock_setup_entry:
|
||||
await hass.config_entries.flow.async_init(
|
||||
deconz.config_flow.DOMAIN,
|
||||
@@ -173,7 +174,8 @@ async def test_get_gateway(hass):
|
||||
async def test_get_gateway_fails_unauthorized(hass):
|
||||
"""Failed call."""
|
||||
with patch(
|
||||
"pydeconz.DeconzSession.initialize", side_effect=pydeconz.errors.Unauthorized,
|
||||
"pydeconz.DeconzSession.initialize",
|
||||
side_effect=pydeconz.errors.Unauthorized,
|
||||
), pytest.raises(deconz.errors.AuthenticationRequired):
|
||||
assert (
|
||||
await deconz.gateway.get_gateway(hass, ENTRY_CONFIG, Mock(), Mock())
|
||||
@@ -184,7 +186,8 @@ async def test_get_gateway_fails_unauthorized(hass):
|
||||
async def test_get_gateway_fails_cannot_connect(hass):
|
||||
"""Failed call."""
|
||||
with patch(
|
||||
"pydeconz.DeconzSession.initialize", side_effect=pydeconz.errors.RequestError,
|
||||
"pydeconz.DeconzSession.initialize",
|
||||
side_effect=pydeconz.errors.RequestError,
|
||||
), pytest.raises(deconz.errors.CannotConnect):
|
||||
assert (
|
||||
await deconz.gateway.get_gateway(hass, ENTRY_CONFIG, Mock(), Mock())
|
||||
|
||||
Reference in new issue
Block a user