Use is in ConfigEntryState enum comparison in tests (N-Z) (#114926)
This commit is contained in:
parent
f2c091fe0c
commit
9204ccfa17
107 changed files with 332 additions and 321 deletions
|
@ -6,7 +6,7 @@ from datetime import datetime
|
|||
|
||||
from freezegun.api import FrozenDateTimeFactory
|
||||
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.config_entries import ConfigEntryState
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.util.dt import UTC
|
||||
|
||||
|
@ -35,7 +35,7 @@ async def test_update_options(
|
|||
freezer.move_to(datetime(2023, 4, 12, 12, tzinfo=UTC)) # Monday
|
||||
|
||||
entry = await init_integration(hass, TEST_CONFIG_WITH_PROVINCE)
|
||||
assert entry.state == config_entries.ConfigEntryState.LOADED
|
||||
assert entry.state is ConfigEntryState.LOADED
|
||||
assert entry.update_listeners is not None
|
||||
state = hass.states.get("binary_sensor.workday_sensor")
|
||||
assert state.state == "on"
|
||||
|
@ -47,6 +47,6 @@ async def test_update_options(
|
|||
await hass.async_block_till_done()
|
||||
|
||||
entry_check = hass.config_entries.async_get_entry("1")
|
||||
assert entry_check.state == config_entries.ConfigEntryState.LOADED
|
||||
assert entry_check.state is ConfigEntryState.LOADED
|
||||
state = hass.states.get("binary_sensor.workday_sensor")
|
||||
assert state.state == "off"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue