Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust device_automation tests which create devices #98187

Merged
merged 1 commit into from
Aug 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/components/device_automation/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down