mirror of
https://github.com/home-assistant/core.git
synced 2026-09-26 01:11:51 -04:00
Refactor MQTT to replace get_mqtt_data with HassKey (#117899)
This commit is contained in:
@@ -43,7 +43,7 @@ async def setup_comp(
|
||||
|
||||
|
||||
async def test_setup_fails_without_mqtt_being_setup(
|
||||
hass: HomeAssistant, caplog: pytest.LogCaptureFixture
|
||||
hass: HomeAssistant, mqtt_mock: MqttMockHAClient, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
"""Ensure mqtt is started when we setup the component."""
|
||||
# Simulate MQTT is was removed
|
||||
@@ -52,6 +52,8 @@ async def test_setup_fails_without_mqtt_being_setup(
|
||||
await hass.config_entries.async_set_disabled_by(
|
||||
mqtt_entry.entry_id, ConfigEntryDisabler.USER
|
||||
)
|
||||
# mqtt is mocked so we need to simulate it is not connected
|
||||
mqtt_mock.connected = False
|
||||
|
||||
dev_id = "zanzito"
|
||||
topic = "location/zanzito"
|
||||
|
||||
Reference in New Issue
Block a user