mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +00:00
Fix flaky emulated_roku/test_binding.py::test_events_fired_properly test (#148069)
This commit is contained in:
parent
5d258c2f82
commit
6235adc69a
@ -15,7 +15,7 @@ from homeassistant.components.emulated_roku.binding import (
|
|||||||
ROKU_COMMAND_LAUNCH,
|
ROKU_COMMAND_LAUNCH,
|
||||||
EmulatedRoku,
|
EmulatedRoku,
|
||||||
)
|
)
|
||||||
from homeassistant.core import Event, HomeAssistant
|
from homeassistant.core import Event, HomeAssistant, callback
|
||||||
|
|
||||||
|
|
||||||
async def test_events_fired_properly(hass: HomeAssistant) -> None:
|
async def test_events_fired_properly(hass: HomeAssistant) -> None:
|
||||||
@ -43,6 +43,7 @@ async def test_events_fired_properly(hass: HomeAssistant) -> None:
|
|||||||
|
|
||||||
return Mock(start=AsyncMock(), close=AsyncMock())
|
return Mock(start=AsyncMock(), close=AsyncMock())
|
||||||
|
|
||||||
|
@callback
|
||||||
def listener(event: Event) -> None:
|
def listener(event: Event) -> None:
|
||||||
if event.data[ATTR_SOURCE_NAME] == random_name:
|
if event.data[ATTR_SOURCE_NAME] == random_name:
|
||||||
events.append(event)
|
events.append(event)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user