Don't require passing identifiers to DeviceRegistry.async_get_device (#96479)
* Require keyword arguments to DeviceRegistry.async_get_device * Update tests * Update tests * Don't enforce keyword arguments
This commit is contained in:
parent
5f46436057
commit
7539cf25be
143 changed files with 654 additions and 494 deletions
|
@ -45,17 +45,17 @@ async def test_device_identifier_migration(
|
|||
sw_version="module_sw_version",
|
||||
)
|
||||
assert device_registry.async_get_device(
|
||||
original_identifiers # type: ignore[arg-type]
|
||||
identifiers=original_identifiers # type: ignore[arg-type]
|
||||
)
|
||||
assert not device_registry.async_get_device(target_identifiers)
|
||||
assert not device_registry.async_get_device(identifiers=target_identifiers)
|
||||
|
||||
await hass.config_entries.async_setup(config_entry.entry_id)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert not device_registry.async_get_device(
|
||||
original_identifiers # type: ignore[arg-type]
|
||||
identifiers=original_identifiers # type: ignore[arg-type]
|
||||
)
|
||||
device_entry = device_registry.async_get_device(target_identifiers)
|
||||
device_entry = device_registry.async_get_device(identifiers=target_identifiers)
|
||||
assert device_entry
|
||||
assert device_entry.name == "channel_name"
|
||||
assert device_entry.manufacturer == "Velleman"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue