mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Small cleanup for Vodafone Station (#142867)
This commit is contained in:
parent
6d78c961d9
commit
b25a0e2272
@ -156,8 +156,6 @@ class VodafoneStationConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
|
|
||||||
errors: dict[str, str] = {}
|
errors: dict[str, str] = {}
|
||||||
|
|
||||||
errors = {}
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
await validate_input(self.hass, user_input)
|
await validate_input(self.hass, user_input)
|
||||||
except aiovodafone_exceptions.AlreadyLogged:
|
except aiovodafone_exceptions.AlreadyLogged:
|
||||||
|
@ -246,12 +246,14 @@ async def test_reconfigure_successful(
|
|||||||
# original entry
|
# original entry
|
||||||
assert mock_config_entry.data["host"] == "fake_host"
|
assert mock_config_entry.data["host"] == "fake_host"
|
||||||
|
|
||||||
|
new_host = "192.168.100.60"
|
||||||
|
|
||||||
reconfigure_result = await hass.config_entries.flow.async_configure(
|
reconfigure_result = await hass.config_entries.flow.async_configure(
|
||||||
result["flow_id"],
|
result["flow_id"],
|
||||||
{
|
user_input={
|
||||||
"host": "192.168.100.60",
|
CONF_HOST: new_host,
|
||||||
"password": "fake_password",
|
CONF_PASSWORD: "fake_password",
|
||||||
"username": "fake_username",
|
CONF_USERNAME: "fake_username",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -259,7 +261,7 @@ async def test_reconfigure_successful(
|
|||||||
assert reconfigure_result["reason"] == "reconfigure_successful"
|
assert reconfigure_result["reason"] == "reconfigure_successful"
|
||||||
|
|
||||||
# changed entry
|
# changed entry
|
||||||
assert mock_config_entry.data["host"] == "192.168.100.60"
|
assert mock_config_entry.data["host"] == new_host
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
@ -290,10 +292,10 @@ async def test_reconfigure_fails(
|
|||||||
|
|
||||||
reconfigure_result = await hass.config_entries.flow.async_configure(
|
reconfigure_result = await hass.config_entries.flow.async_configure(
|
||||||
result["flow_id"],
|
result["flow_id"],
|
||||||
{
|
user_input={
|
||||||
"host": "192.168.100.60",
|
CONF_HOST: "192.168.100.60",
|
||||||
"password": "fake_password",
|
CONF_PASSWORD: "fake_password",
|
||||||
"username": "fake_username",
|
CONF_USERNAME: "fake_username",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user