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

+2 -4
View File
@@ -6,8 +6,6 @@ import pytest
from homeassistant.core import State
from homeassistant.setup import async_setup_component
from . import _signal_event
from tests.common import mock_restore_cache
@@ -111,12 +109,12 @@ async def test_discover_covers(hass, rfxtrx):
await hass.async_block_till_done()
await hass.async_start()
await _signal_event(hass, "0a140002f38cae010f0070")
await rfxtrx.signal("0a140002f38cae010f0070")
state = hass.states.get("cover.lightwaverf_siemens_f38cae_1")
assert state
assert state.state == "open"
await _signal_event(hass, "0a1400adf394ab020e0060")
await rfxtrx.signal("0a1400adf394ab020e0060")
state = hass.states.get("cover.lightwaverf_siemens_f394ab_2")
assert state
assert state.state == "open"