Fix totalconnect test calling public host (#51138)
This commit is contained in:
parent
ca8d09e5e1
commit
e08de22737
1 changed files with 4 additions and 4 deletions
|
@ -135,15 +135,14 @@ async def test_reauth(hass):
|
|||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN, context={"source": SOURCE_REAUTH}, data=entry.data
|
||||
)
|
||||
assert result["step_id"] == "reauth_confirm"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(result["flow_id"])
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
||||
assert result["step_id"] == "reauth_confirm"
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.totalconnect.config_flow.TotalConnectClient.TotalConnectClient"
|
||||
) as client_mock:
|
||||
) as client_mock, patch(
|
||||
"homeassistant.components.totalconnect.async_setup_entry", return_value=True
|
||||
):
|
||||
# first test with an invalid password
|
||||
client_mock.return_value.is_valid_credentials.return_value = False
|
||||
|
||||
|
@ -162,5 +161,6 @@ async def test_reauth(hass):
|
|||
)
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
|
||||
assert result["reason"] == "reauth_successful"
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert len(hass.config_entries.async_entries()) == 1
|
||||
|
|
Loading…
Add table
Reference in a new issue