mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 20:40:18 +00:00
Use is in ConfigEntryState enum comparison in tests (A-M) (#114925)
This commit is contained in:
@@ -155,13 +155,13 @@ async def test_offline_device_raises(hass: HomeAssistant, controller) -> None:
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert config_entry.state == ConfigEntryState.SETUP_RETRY
|
||||
assert config_entry.state is ConfigEntryState.SETUP_RETRY
|
||||
|
||||
is_connected = True
|
||||
|
||||
async_fire_time_changed(hass, utcnow() + timedelta(seconds=10))
|
||||
await hass.async_block_till_done()
|
||||
assert config_entry.state == ConfigEntryState.LOADED
|
||||
assert config_entry.state is ConfigEntryState.LOADED
|
||||
assert hass.states.get("light.testdevice").state == STATE_OFF
|
||||
|
||||
|
||||
@@ -212,13 +212,13 @@ async def test_ble_device_only_checks_is_available(
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert config_entry.state == ConfigEntryState.SETUP_RETRY
|
||||
assert config_entry.state is ConfigEntryState.SETUP_RETRY
|
||||
|
||||
is_available = True
|
||||
|
||||
async_fire_time_changed(hass, utcnow() + timedelta(seconds=10))
|
||||
await hass.async_block_till_done()
|
||||
assert config_entry.state == ConfigEntryState.LOADED
|
||||
assert config_entry.state is ConfigEntryState.LOADED
|
||||
assert hass.states.get("light.testdevice").state == STATE_OFF
|
||||
|
||||
is_available = False
|
||||
|
||||
Reference in New Issue
Block a user