1
0
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:
Erik Montnemery
2023-01-09 20:50:27 +01:00
committed by GitHub
parent a8f95c36a6
commit 8983f665cf
3 changed files with 96 additions and 73 deletions

View File

@@ -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",