Avoid using implementation internal to trigger events (#38041)

This uses the moxking in fixture to trigger events.
This commit is contained in:
Joakim Plate authored and GitHub committed 2020-07-22 00:24:26 +02:00
1 parent 945acb4e29
commit 7a3c6d6525
8 files changed
+41 -50

No files matched your search

-13
View File
@@ -1,14 +1 @@
"""Tests for the rfxtrx component."""
from homeassistant.components import rfxtrx
async def _signal_event(hass, packet_id):
event = rfxtrx.get_rfx_object(packet_id)
await hass.async_add_executor_job(
hass.data[rfxtrx.DOMAIN][rfxtrx.DATA_RFXOBJECT].event_callback, event,
)
await hass.async_block_till_done()
await hass.async_block_till_done()
return event