Skip to content

Commit

Permalink
Merge branch 'home-assistant:dev' into minutely-action
Browse files Browse the repository at this point in the history
  • Loading branch information
10100011 authored Oct 21, 2024
2 parents ede911f + 59ad69b commit 5e2a3dc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
13 changes: 11 additions & 2 deletions homeassistant/components/imap/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@
ConfigFlowResult,
OptionsFlowWithConfigEntry,
)
from homeassistant.const import CONF_PASSWORD, CONF_PORT, CONF_USERNAME, CONF_VERIFY_SSL
from homeassistant.const import (
CONF_NAME,
CONF_PASSWORD,
CONF_PORT,
CONF_USERNAME,
CONF_VERIFY_SSL,
)
from homeassistant.core import HomeAssistant, callback
from homeassistant.data_entry_flow import AbortFlow
from homeassistant.helpers import config_validation as cv
Expand Down Expand Up @@ -190,7 +196,10 @@ async def async_step_reauth_confirm(
return self.async_update_reload_and_abort(reauth_entry, data=user_input)

return self.async_show_form(
description_placeholders={CONF_USERNAME: reauth_entry.data[CONF_USERNAME]},
description_placeholders={
CONF_USERNAME: reauth_entry.data[CONF_USERNAME],
CONF_NAME: reauth_entry.title,
},
step_id="reauth_confirm",
data_schema=vol.Schema(
{
Expand Down
7 changes: 5 additions & 2 deletions tests/components/imap/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
DOMAIN,
)
from homeassistant.components.imap.errors import InvalidAuth, InvalidFolder
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from homeassistant.const import CONF_NAME, CONF_PASSWORD, CONF_USERNAME
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResultType

Expand Down Expand Up @@ -218,7 +218,10 @@ async def test_reauth_success(hass: HomeAssistant, mock_setup_entry: AsyncMock)
result = await entry.start_reauth_flow(hass)
assert result["type"] is FlowResultType.FORM
assert result["step_id"] == "reauth_confirm"
assert result["description_placeholders"] == {CONF_USERNAME: "email@email.com"}
assert result["description_placeholders"] == {
CONF_USERNAME: "email@email.com",
CONF_NAME: "Mock Title",
}

with patch(
"homeassistant.components.imap.config_flow.connect_to_server"
Expand Down

0 comments on commit 5e2a3dc

Please sign in to comment.