mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Move MQTT discovery hass.data globals to dataclass (#78706)
* Add MQTT discovery hass.data globals to dataclass * isort * Additional rework * Add hass.data["mqtt_tags"] to dataclass * Follow-up comment * Corrections
This commit is contained in:
@@ -186,7 +186,18 @@ async def test_manual_config_set(
|
||||
"discovery": True,
|
||||
}
|
||||
# Check we tried the connection, with precedence for config entry settings
|
||||
mock_try_connection.assert_called_once_with(hass, "127.0.0.1", 1883, None, None)
|
||||
mock_try_connection.assert_called_once_with(
|
||||
{
|
||||
"broker": "bla",
|
||||
"keepalive": 60,
|
||||
"discovery_prefix": "homeassistant",
|
||||
"protocol": "3.1.1",
|
||||
},
|
||||
"127.0.0.1",
|
||||
1883,
|
||||
None,
|
||||
None,
|
||||
)
|
||||
# Check config entry got setup
|
||||
assert len(mock_finish_setup.mock_calls) == 1
|
||||
config_entry = hass.config_entries.async_entries(mqtt.DOMAIN)[0]
|
||||
|
||||
Reference in New Issue
Block a user