2020-01-14 21:03:02 +00:00
|
|
|
"""Tests for safe mode integration."""
|
2023-02-08 16:12:54 +00:00
|
|
|
from homeassistant.core import HomeAssistant
|
2020-01-14 21:03:02 +00:00
|
|
|
from homeassistant.setup import async_setup_component
|
|
|
|
|
2023-05-26 03:09:13 +00:00
|
|
|
from tests.common import async_get_persistent_notifications
|
|
|
|
|
2020-01-14 21:03:02 +00:00
|
|
|
|
2023-02-08 16:12:54 +00:00
|
|
|
async def test_works(hass: HomeAssistant) -> None:
|
2020-01-14 21:03:02 +00:00
|
|
|
"""Test safe mode works."""
|
|
|
|
assert await async_setup_component(hass, "safe_mode", {})
|
|
|
|
await hass.async_block_till_done()
|
2023-05-26 03:09:13 +00:00
|
|
|
notifications = async_get_persistent_notifications(hass)
|
|
|
|
assert len(notifications) == 1
|