mirror of
https://github.com/home-assistant/core.git
synced 2025-12-25 05:26:47 +00:00
Update MQTT tests to not create duplicated config entries (#36833)
This commit is contained in:
@@ -40,11 +40,7 @@ from .test_common import (
|
||||
)
|
||||
|
||||
from tests.async_mock import patch
|
||||
from tests.common import (
|
||||
MockConfigEntry,
|
||||
async_fire_mqtt_message,
|
||||
async_fire_time_changed,
|
||||
)
|
||||
from tests.common import async_fire_mqtt_message, async_fire_time_changed
|
||||
|
||||
DEFAULT_CONFIG = {
|
||||
sensor.DOMAIN: {"platform": "mqtt", "name": "test", "state_topic": "test-topic"}
|
||||
@@ -431,8 +427,7 @@ async def test_entity_id_update_discovery_update(hass, mqtt_mock):
|
||||
|
||||
async def test_entity_device_info_with_hub(hass, mqtt_mock):
|
||||
"""Test MQTT sensor device registry integration."""
|
||||
entry = MockConfigEntry(domain=mqtt.DOMAIN)
|
||||
entry.add_to_hass(hass)
|
||||
entry = hass.config_entries.async_entries(mqtt.DOMAIN)[0]
|
||||
await async_start(hass, "homeassistant", entry)
|
||||
|
||||
registry = await hass.helpers.device_registry.async_get_registry()
|
||||
|
||||
Reference in New Issue
Block a user