Remove unneeded mock from Epion (#110815)
parent
4570eed6f6
commit
1417428880
|
@ -100,16 +100,11 @@ async def test_duplicate_entry(hass: HomeAssistant, mock_epion: MagicMock) -> No
|
|||
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
||||
)
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.epion.async_setup_entry",
|
||||
return_value=True,
|
||||
) as mock_setup_entry:
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
{CONF_API_KEY: API_KEY},
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
result = await hass.config_entries.flow.async_configure(
|
||||
result["flow_id"],
|
||||
{CONF_API_KEY: API_KEY},
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert result["type"] == FlowResultType.ABORT
|
||||
assert result["reason"] == "already_configured"
|
||||
assert mock_setup_entry.call_count == 0
|
||||
|
|
Loading…
Reference in New Issue