mirror of
https://github.com/home-assistant/core.git
synced 2026-09-25 17:04:04 -04:00
Remove async_setup from zerproc (#93903)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user