mirror of
https://github.com/home-assistant/core.git
synced 2026-09-28 02:18:10 -04:00
Do not wait for mqtt at startup mqtt_statestream (#91721)
This commit is contained in:
@@ -96,12 +96,19 @@ async def test_setup_and_stop_waits_for_ha(
|
||||
mqtt_mock.async_publish.assert_not_called()
|
||||
|
||||
|
||||
@pytest.mark.xfail()
|
||||
async def test_startup_no_mqtt(
|
||||
hass: HomeAssistant, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
"""Test startup without MQTT support."""
|
||||
assert not await add_statestream(hass, base_topic="pub")
|
||||
assert "MQTT integration is not available" in caplog.text
|
||||
e_id = "fake.entity"
|
||||
|
||||
assert await add_statestream(hass, base_topic="pub")
|
||||
# Set a state of an entity
|
||||
mock_state_change_event(hass, State(e_id, "on"))
|
||||
await hass.async_block_till_done()
|
||||
await hass.async_block_till_done()
|
||||
assert "MQTT is not enabled" in caplog.text
|
||||
|
||||
|
||||
async def test_setup_succeeds_with_attributes(
|
||||
|
||||
Reference in New Issue
Block a user