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
@@ -87,7 +87,8 @@ async def test_flow_manual_configuration_decision(hass, aioclient_mock):
|
||||
assert result["step_id"] == "manual_input"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"], user_input={CONF_HOST: "1.2.3.4", CONF_PORT: 80},
|
||||
result["flow_id"],
|
||||
user_input={CONF_HOST: "1.2.3.4", CONF_PORT: 80},
|
||||
)
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
||||
@@ -134,7 +135,8 @@ async def test_flow_manual_configuration(hass, aioclient_mock):
|
||||
assert result["step_id"] == "manual_input"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"], user_input={CONF_HOST: "1.2.3.4", CONF_PORT: 80},
|
||||
result["flow_id"],
|
||||
user_input={CONF_HOST: "1.2.3.4", CONF_PORT: 80},
|
||||
)
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
||||
@@ -209,7 +211,8 @@ async def test_manual_configuration_update_configuration(hass, aioclient_mock):
|
||||
assert result["step_id"] == "manual_input"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"], user_input={CONF_HOST: "2.3.4.5", CONF_PORT: 80},
|
||||
result["flow_id"],
|
||||
user_input={CONF_HOST: "2.3.4.5", CONF_PORT: 80},
|
||||
)
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
||||
@@ -254,7 +257,8 @@ async def test_manual_configuration_dont_update_configuration(hass, aioclient_mo
|
||||
assert result["step_id"] == "manual_input"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"], user_input={CONF_HOST: "1.2.3.4", CONF_PORT: 80},
|
||||
result["flow_id"],
|
||||
user_input={CONF_HOST: "1.2.3.4", CONF_PORT: 80},
|
||||
)
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
||||
@@ -296,7 +300,8 @@ async def test_manual_configuration_timeout_get_bridge(hass, aioclient_mock):
|
||||
assert result["step_id"] == "manual_input"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"], user_input={CONF_HOST: "1.2.3.4", CONF_PORT: 80},
|
||||
result["flow_id"],
|
||||
user_input={CONF_HOST: "1.2.3.4", CONF_PORT: 80},
|
||||
)
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
||||
@@ -401,7 +406,8 @@ async def test_ssdp_discovery_update_configuration(hass):
|
||||
gateway = await setup_deconz_integration(hass)
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.deconz.async_setup_entry", return_value=True,
|
||||
"homeassistant.components.deconz.async_setup_entry",
|
||||
return_value=True,
|
||||
) as mock_setup_entry:
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN,
|
||||
@@ -478,7 +484,8 @@ async def test_flow_hassio_discovery(hass):
|
||||
with patch(
|
||||
"homeassistant.components.deconz.async_setup", return_value=True
|
||||
) as mock_setup, patch(
|
||||
"homeassistant.components.deconz.async_setup_entry", return_value=True,
|
||||
"homeassistant.components.deconz.async_setup_entry",
|
||||
return_value=True,
|
||||
) as mock_setup_entry:
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"], user_input={}
|
||||
@@ -500,7 +507,8 @@ async def test_hassio_discovery_update_configuration(hass):
|
||||
gateway = await setup_deconz_integration(hass)
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.deconz.async_setup_entry", return_value=True,
|
||||
"homeassistant.components.deconz.async_setup_entry",
|
||||
return_value=True,
|
||||
) as mock_setup_entry:
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN,
|
||||
|
||||
@@ -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