Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lingering mqtt unload entry test #124392

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tests/components/mqtt/test_device_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from .test_common import help_test_unload_config_entry

from tests.common import async_fire_mqtt_message, async_get_device_automations
from tests.typing import MqttMockHAClient, MqttMockHAClientGenerator, WebSocketGenerator
from tests.typing import MqttMockHAClientGenerator, WebSocketGenerator


@pytest.fixture(autouse=True, name="stub_blueprint_populate")
Expand Down Expand Up @@ -1672,11 +1672,11 @@ async def test_trigger_debug_info(
assert debug_info_data["triggers"][0]["discovery_data"]["payload"] == config2


@pytest.mark.usefixtures("mqtt_mock")
async def test_unload_entry(
hass: HomeAssistant,
service_calls: list[ServiceCall],
device_registry: dr.DeviceRegistry,
mqtt_mock: MqttMockHAClient,
) -> None:
"""Test unloading the MQTT entry."""

Expand Down Expand Up @@ -1738,3 +1738,4 @@ async def test_unload_entry(
async_fire_mqtt_message(hass, "foobar/triggers/button1", "short_press")
await hass.async_block_till_done()
assert len(service_calls) == 2
await hass.async_block_till_done(wait_background_tasks=True)
Loading