Switch tests to use hass objects instead of direct (#37530)

* Switch tests to use hass objects instead of direct

* Make sure sensor update state

* Add some initial binary sensor tests

* Add initial binary sensor tests

* Add tests for pt2262

* Add test for off delay
This commit is contained in:
Joakim Plate authored and GitHub committed 2020-07-05 22:41:11 +02:00
1 parent 3ad59f877c
commit 01fd33f173
11 files changed
+640 -548

No files matched your search

+4 -1
View File
@@ -68,7 +68,10 @@ async def rfxtrx_fixture(hass):
"""Stub out core rfxtrx to test platform."""
mock_component(hass, "rfxtrx")
yield
rfxobject = mock.MagicMock()
hass.data[rfxtrx_core.DATA_RFXOBJECT] = rfxobject
yield rfxobject
# These test don't listen for stop to do cleanup.
if rfxtrx_core.DATA_RFXOBJECT in hass.data: