Adjust device_automation tests which create devices (#98187)

This commit is contained in:
Erik Montnemery 2023-08-10 18:25:42 +02:00 committed by GitHub
parent 57d0fd7bb1
commit e1e4b0dcf0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1496,8 +1496,10 @@ async def test_automation_with_device_wrong_domain(
module = module_cache["fake_integration.device_trigger"]
module.async_validate_trigger_config = AsyncMock()
source_config_entry = MockConfigEntry(domain="not_fake_integration")
source_config_entry.add_to_hass(hass)
device_entry = device_registry.async_get_or_create(
config_entry_id="not_fake_integration_config_entry",
config_entry_id=source_config_entry.entry_id,
connections={(dr.CONNECTION_NETWORK_MAC, "12:34:56:AB:CD:EF")},
)
assert await async_setup_component(