Remove unneeded mock from Epion (#110815)

pull/110136/head
Joost Lekkerkerker 2024-02-17 22:53:38 +01:00 committed by GitHub
parent 4570eed6f6
commit 1417428880
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 10 deletions

View File

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