Adjust mqtt tests which create devices (#98202)
This commit is contained in:
parent
0b69f37d57
commit
13a9b83ed3
1 changed files with 4 additions and 2 deletions
|
@ -48,7 +48,7 @@ from .test_common import (
|
||||||
help_test_update_with_json_attrs_not_dict,
|
help_test_update_with_json_attrs_not_dict,
|
||||||
)
|
)
|
||||||
|
|
||||||
from tests.common import async_fire_mqtt_message
|
from tests.common import MockConfigEntry, async_fire_mqtt_message
|
||||||
from tests.typing import MqttMockHAClientGenerator, MqttMockPahoClient
|
from tests.typing import MqttMockHAClientGenerator, MqttMockPahoClient
|
||||||
|
|
||||||
DEFAULT_CONFIG = {
|
DEFAULT_CONFIG = {
|
||||||
|
@ -503,9 +503,11 @@ async def test_entity_device_info_with_hub(
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test MQTT event device registry integration."""
|
"""Test MQTT event device registry integration."""
|
||||||
await mqtt_mock_entry()
|
await mqtt_mock_entry()
|
||||||
|
other_config_entry = MockConfigEntry()
|
||||||
|
other_config_entry.add_to_hass(hass)
|
||||||
registry = dr.async_get(hass)
|
registry = dr.async_get(hass)
|
||||||
hub = registry.async_get_or_create(
|
hub = registry.async_get_or_create(
|
||||||
config_entry_id="123",
|
config_entry_id=other_config_entry.entry_id,
|
||||||
connections=set(),
|
connections=set(),
|
||||||
identifiers={("mqtt", "hub-id")},
|
identifiers={("mqtt", "hub-id")},
|
||||||
manufacturer="manufacturer",
|
manufacturer="manufacturer",
|
||||||
|
|
Loading…
Add table
Reference in a new issue