1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Make device entry disabled by an enum (#60239)

This commit is contained in:
Ville Skyttä
2021-11-24 23:32:16 +02:00
committed by GitHub
parent 42389fc81b
commit 9f4de8df18
7 changed files with 52 additions and 39 deletions

View File

@@ -97,7 +97,7 @@ async def test_update_device(hass, client, registry):
"device_id": device.id,
"area_id": "12345A",
"name_by_user": "Test Friendly Name",
"disabled_by": helpers_dr.DISABLED_USER,
"disabled_by": helpers_dr.DeviceEntryDisabler.USER,
"type": "config/device_registry/update",
}
)
@@ -107,5 +107,5 @@ async def test_update_device(hass, client, registry):
assert msg["result"]["id"] == device.id
assert msg["result"]["area_id"] == "12345A"
assert msg["result"]["name_by_user"] == "Test Friendly Name"
assert msg["result"]["disabled_by"] == helpers_dr.DISABLED_USER
assert msg["result"]["disabled_by"] == helpers_dr.DeviceEntryDisabler.USER
assert len(registry.devices) == 1