mirror of https://github.com/home-assistant/core
18 lines
583 B
Python
18 lines
583 B
Python
"""Test Worldclock component setup process."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from homeassistant.config_entries import ConfigEntryState
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from tests.common import MockConfigEntry
|
|
|
|
|
|
async def test_unload_entry(hass: HomeAssistant, loaded_entry: MockConfigEntry) -> None:
|
|
"""Test unload an entry."""
|
|
|
|
assert loaded_entry.state is ConfigEntryState.LOADED
|
|
assert await hass.config_entries.async_unload(loaded_entry.entry_id)
|
|
await hass.async_block_till_done()
|
|
assert loaded_entry.state is ConfigEntryState.NOT_LOADED
|