Adjust mazda tests which create devices (#98199)

pull/97823/head^2
Erik Montnemery 2023-08-10 18:23:44 +02:00 committed by GitHub
parent e9a0436605
commit 9831498259
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -259,8 +259,10 @@ async def test_service_device_id_not_mazda_vehicle(hass: HomeAssistant) -> None:
device_registry = dr.async_get(hass)
# Create another device and pass its device ID.
# Service should fail because device is from wrong domain.
other_config_entry = MockConfigEntry()
other_config_entry.add_to_hass(hass)
other_device = device_registry.async_get_or_create(
config_entry_id="test_config_entry_id",
config_entry_id=other_config_entry.entry_id,
identifiers={("OTHER_INTEGRATION", "ID_FROM_OTHER_INTEGRATION")},
)