mirror of
https://github.com/home-assistant/core.git
synced 2025-12-27 06:28:31 +00:00
Refactor device registry JSON cache (#85539)
This commit is contained in:
@@ -85,7 +85,10 @@ async def test_list_devices(hass, client, registry):
|
||||
},
|
||||
]
|
||||
|
||||
registry.async_remove_device(device2.id)
|
||||
class Unserializable:
|
||||
"""Good luck serializing me."""
|
||||
|
||||
registry.async_update_device(device2.id, name=Unserializable())
|
||||
await hass.async_block_till_done()
|
||||
|
||||
await client.send_json({"id": 6, "type": "config/device_registry/list"})
|
||||
@@ -111,6 +114,9 @@ async def test_list_devices(hass, client, registry):
|
||||
}
|
||||
]
|
||||
|
||||
# Remove the bad device to avoid errors when test is being torn down
|
||||
registry.async_remove_device(device2.id)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"payload_key,payload_value",
|
||||
|
||||
Reference in New Issue
Block a user