Change newly appeared DISABLED_USERs in tests to RegistryEntryDisablers (#68799)
This commit is contained in:
parent
c1a2be72fc
commit
38ef183433
2 changed files with 4 additions and 4 deletions
|
@ -108,7 +108,7 @@ async def test_init_accepts_and_migrates_old_entry(aioclient_mock, hass):
|
|||
config_entry=original_entry,
|
||||
original_name="Switch Disabled",
|
||||
suggested_object_id="socket_disabled",
|
||||
disabled_by=er.DISABLED_USER,
|
||||
disabled_by=er.RegistryEntryDisabler.USER,
|
||||
)
|
||||
# Update some user-customs
|
||||
ent_reg.async_update_entity(old_entity_active_power.entity_id, name="new_name")
|
||||
|
@ -158,7 +158,7 @@ async def test_init_accepts_and_migrates_old_entry(aioclient_mock, hass):
|
|||
assert new_entity_disabled_sensor.name is None
|
||||
assert new_entity_disabled_sensor.original_name == "Switch Disabled"
|
||||
assert new_entity_disabled_sensor.unique_id == "socket_disabled_unique_id"
|
||||
assert new_entity_disabled_sensor.disabled_by == er.DISABLED_USER
|
||||
assert new_entity_disabled_sensor.disabled_by == er.RegistryEntryDisabler.USER
|
||||
|
||||
|
||||
async def test_load_detect_api_disabled(aioclient_mock, hass):
|
||||
|
|
|
@ -84,7 +84,7 @@ async def test_climacell_migration_logic(
|
|||
original_name="ClimaCell - Hourly",
|
||||
suggested_object_id="climacell_hourly",
|
||||
device_id=old_device.id,
|
||||
disabled_by=er.DISABLED_USER,
|
||||
disabled_by=er.RegistryEntryDisabler.USER,
|
||||
)
|
||||
old_entity_nowcast = ent_reg.async_get_or_create(
|
||||
"weather",
|
||||
|
@ -140,7 +140,7 @@ async def test_climacell_migration_logic(
|
|||
assert new_entity_hourly.original_name == "ClimaCell - Hourly"
|
||||
assert new_entity_hourly.device_id != old_device.id
|
||||
assert new_entity_hourly.unique_id == f"{_get_unique_id(hass, new_data)}_hourly"
|
||||
assert new_entity_hourly.disabled_by == er.DISABLED_USER
|
||||
assert new_entity_hourly.disabled_by == er.RegistryEntryDisabler.USER
|
||||
|
||||
new_entity_nowcast = ent_reg.async_get(old_entity_nowcast.entity_id)
|
||||
assert new_entity_nowcast.platform == DOMAIN
|
||||
|
|
Loading…
Add table
Reference in a new issue