Fix watttime config flow and tests (#57498)
parent
0c04ca20c6
commit
d10b1d9fe0
|
@ -78,7 +78,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
|
||||
async def _async_validate_credentials(
|
||||
self, username: str, password: str, error_step_id: str, error_schema: vol.Schema
|
||||
):
|
||||
) -> FlowResult:
|
||||
"""Validate input credentials and proceed accordingly."""
|
||||
session = aiohttp_client.async_get_clientsession(self.hass)
|
||||
|
||||
|
|
|
@ -179,7 +179,6 @@ async def test_step_reauth(hass: HomeAssistant, client_login) -> None:
|
|||
},
|
||||
).add_to_hass(hass)
|
||||
|
||||
await setup.async_setup_component(hass, "persistent_notification", {})
|
||||
with patch(
|
||||
"homeassistant.components.watttime.async_setup_entry",
|
||||
return_value=True,
|
||||
|
@ -222,7 +221,6 @@ async def test_step_reauth_invalid_credentials(hass: HomeAssistant) -> None:
|
|||
},
|
||||
).add_to_hass(hass)
|
||||
|
||||
await setup.async_setup_component(hass, "persistent_notification", {})
|
||||
with patch(
|
||||
"homeassistant.components.watttime.config_flow.Client.async_login",
|
||||
AsyncMock(side_effect=InvalidCredentialsError),
|
||||
|
|
Loading…
Reference in New Issue