Fix watttime config flow and tests (#57498)

pull/57552/head
Martin Hjelmare 2021-10-11 22:08:57 +02:00 committed by GitHub
parent 0c04ca20c6
commit d10b1d9fe0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -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)

View File

@ -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),