mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Use is in ConfigEntryState enum comparison in tests (A-M) (#114925)
This commit is contained in:
@@ -19,7 +19,7 @@ async def test_setup_config_and_unload(
|
||||
await setup_integration()
|
||||
|
||||
entry = hass.config_entries.async_entries(DOMAIN)[0]
|
||||
assert entry.state == ConfigEntryState.LOADED
|
||||
assert entry.state is ConfigEntryState.LOADED
|
||||
assert len(hass.config_entries.async_entries(DOMAIN)) == 1
|
||||
assert entry.data == CONF_DATA
|
||||
|
||||
@@ -37,7 +37,7 @@ async def test_legacy_setup_config_and_unload(
|
||||
await setup_integration_legacy()
|
||||
|
||||
entry = hass.config_entries.async_entries(DOMAIN)[0]
|
||||
assert entry.state == ConfigEntryState.LOADED
|
||||
assert entry.state is ConfigEntryState.LOADED
|
||||
assert len(hass.config_entries.async_entries(DOMAIN)) == 1
|
||||
assert entry.data == CONF_DATA
|
||||
|
||||
@@ -56,7 +56,7 @@ async def test_async_setup_entry_not_ready(
|
||||
"""Test that it throws ConfigEntryNotReady when exception occurs during legacy setup."""
|
||||
with patch_setup(mocked_plug_legacy_no_auth):
|
||||
await hass.config_entries.async_setup(config_entry_with_uid.entry_id)
|
||||
assert config_entry_with_uid.state == ConfigEntryState.SETUP_RETRY
|
||||
assert config_entry_with_uid.state is ConfigEntryState.SETUP_RETRY
|
||||
|
||||
|
||||
async def test_device_info(
|
||||
|
||||
Reference in New Issue
Block a user