Remove async_setup from zerproc (#93903)

This commit is contained in:
Erik Montnemery
2023-06-01 11:33:37 +02:00
committed by GitHub
parent e0db9ab041
commit ba76bbee44
2 changed files with 1 additions and 20 deletions
@@ -21,8 +21,6 @@ async def test_flow_success(hass: HomeAssistant) -> None:
"homeassistant.components.zerproc.config_flow.pyzerproc.discover",
return_value=["Light1", "Light2"],
), patch(
"homeassistant.components.zerproc.async_setup", return_value=True
) as mock_setup, patch(
"homeassistant.components.zerproc.async_setup_entry",
return_value=True,
) as mock_setup_entry:
@@ -36,7 +34,6 @@ async def test_flow_success(hass: HomeAssistant) -> None:
assert result2["title"] == "Zerproc"
assert result2["data"] == {}
assert len(mock_setup.mock_calls) == 1
assert len(mock_setup_entry.mock_calls) == 1
@@ -53,8 +50,6 @@ async def test_flow_no_devices_found(hass: HomeAssistant) -> None:
"homeassistant.components.zerproc.config_flow.pyzerproc.discover",
return_value=[],
), patch(
"homeassistant.components.zerproc.async_setup", return_value=True
) as mock_setup, patch(
"homeassistant.components.zerproc.async_setup_entry",
return_value=True,
) as mock_setup_entry:
@@ -66,7 +61,6 @@ async def test_flow_no_devices_found(hass: HomeAssistant) -> None:
assert result2["type"] == "abort"
assert result2["reason"] == "no_devices_found"
await hass.async_block_till_done()
assert len(mock_setup.mock_calls) == 0
assert len(mock_setup_entry.mock_calls) == 0
@@ -83,8 +77,6 @@ async def test_flow_exceptions_caught(hass: HomeAssistant) -> None:
"homeassistant.components.zerproc.config_flow.pyzerproc.discover",
side_effect=pyzerproc.ZerprocException("TEST"),
), patch(
"homeassistant.components.zerproc.async_setup", return_value=True
) as mock_setup, patch(
"homeassistant.components.zerproc.async_setup_entry",
return_value=True,
) as mock_setup_entry:
@@ -96,5 +88,4 @@ async def test_flow_exceptions_caught(hass: HomeAssistant) -> None:
assert result2["type"] == "abort"
assert result2["reason"] == "no_devices_found"
await hass.async_block_till_done()
assert len(mock_setup.mock_calls) == 0
assert len(mock_setup_entry.mock_calls) == 0