Adjust device_tracker tests which create devices (#98188)

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

View File

@ -25,9 +25,11 @@ async def test_scanner_entity_device_tracker(
) -> None:
"""Test ScannerEntity based device tracker."""
# Make device tied to other integration so device tracker entities get enabled
other_config_entry = MockConfigEntry(domain="not_fake_integration")
other_config_entry.add_to_hass(hass)
dr.async_get(hass).async_get_or_create(
name="Device from other integration",
config_entry_id=MockConfigEntry().entry_id,
config_entry_id=other_config_entry.entry_id,
connections={(dr.CONNECTION_NETWORK_MAC, "ad:de:ef:be:ed:fe")},
)