mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +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 = {}
|
||||
|
||||
try:
|
||||
await validate_input(self.hass, user_input)
|
||||
except aiovodafone_exceptions.AlreadyLogged:
|
||||
|
@ -246,12 +246,14 @@ async def test_reconfigure_successful(
|
||||
# original entry
|
||||
assert mock_config_entry.data["host"] == "fake_host"
|
||||
|
||||
new_host = "192.168.100.60"
|
||||
|
||||
reconfigure_result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
{
|
||||
"host": "192.168.100.60",
|
||||
"password": "fake_password",
|
||||
"username": "fake_username",
|
||||
user_input={
|
||||
CONF_HOST: new_host,
|
||||
CONF_PASSWORD: "fake_password",
|
||||
CONF_USERNAME: "fake_username",
|
||||
},
|
||||
)
|
||||
|
||||
@ -259,7 +261,7 @@ async def test_reconfigure_successful(
|
||||
assert reconfigure_result["reason"] == "reconfigure_successful"
|
||||
|
||||
# changed entry
|
||||
assert mock_config_entry.data["host"] == "192.168.100.60"
|
||||
assert mock_config_entry.data["host"] == new_host
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@ -290,10 +292,10 @@ async def test_reconfigure_fails(
|
||||
|
||||
reconfigure_result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
{
|
||||
"host": "192.168.100.60",
|
||||
"password": "fake_password",
|
||||
"username": "fake_username",
|
||||
user_input={
|
||||
CONF_HOST: "192.168.100.60",
|
||||
CONF_PASSWORD: "fake_password",
|
||||
CONF_USERNAME: "fake_username",
|
||||
},
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user