mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 04:50:05 +00:00
Use is in ConfigEntryState enum comparison in tests (A-M) (#114925)
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.components.local_ip import DOMAIN
|
||||
from homeassistant.components.network import MDNS_TARGET_IP, async_get_source_ip
|
||||
from homeassistant.config_entries import ConfigEntryState
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
from tests.common import MockConfigEntry
|
||||
@@ -17,7 +17,7 @@ async def test_basic_setup(hass: HomeAssistant, mock_get_source_ip) -> None:
|
||||
|
||||
await hass.config_entries.async_setup(entry.entry_id)
|
||||
await hass.async_block_till_done()
|
||||
assert entry.state == config_entries.ConfigEntryState.LOADED
|
||||
assert entry.state is ConfigEntryState.LOADED
|
||||
|
||||
local_ip = await async_get_source_ip(hass, target_ip=MDNS_TARGET_IP)
|
||||
state = hass.states.get(f"sensor.{DOMAIN}")
|
||||
@@ -26,4 +26,4 @@ async def test_basic_setup(hass: HomeAssistant, mock_get_source_ip) -> None:
|
||||
|
||||
assert await hass.config_entries.async_unload(entry.entry_id)
|
||||
await hass.async_block_till_done()
|
||||
assert entry.state is config_entries.ConfigEntryState.NOT_LOADED
|
||||
assert entry.state is ConfigEntryState.NOT_LOADED
|
||||
|
||||
Reference in New Issue
Block a user