mirror of
https://github.com/home-assistant/core.git
synced 2025-11-16 06:20:07 +00:00
Fix hassio mocking in ESPHome dashboard tests (#143212)
This commit is contained in:
@@ -81,6 +81,7 @@ async def test_restore_dashboard_storage_end_to_end(
|
||||
assert mock_dashboard_api.mock_calls[0][1][0] == "http://new-host:6052"
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("hassio_stubs")
|
||||
async def test_restore_dashboard_storage_skipped_if_addon_uninstalled(
|
||||
hass: HomeAssistant,
|
||||
hass_storage: dict[str, Any],
|
||||
@@ -105,9 +106,7 @@ async def test_restore_dashboard_storage_skipped_if_addon_uninstalled(
|
||||
return_value={},
|
||||
),
|
||||
):
|
||||
await async_setup_component(hass, "hassio", {})
|
||||
await hass.async_block_till_done()
|
||||
await async_setup_component(hass, DOMAIN, {})
|
||||
assert await async_setup_component(hass, DOMAIN, {})
|
||||
await hass.async_block_till_done()
|
||||
assert "test-slug is no longer installed" in caplog.text
|
||||
assert not mock_dashboard_api.called
|
||||
|
||||
Reference in New Issue
Block a user