* Use set not list * Events are not entities * Don't await unload_events * Remove checks of entities content in tests * List to set comprehension * Why is it so hard to remember that sets arent parenthesis...
This commit is contained in:
1 parent
8895752837
commit
66a8edb11e
12 files changed
+20
-67
No files matched your search
@@ -1,7 +1,7 @@
|
||||
"""Test deCONZ remote events."""
|
||||
from copy import deepcopy
|
||||
|
||||
from homeassistant.components.deconz.deconz_event import CONF_DECONZ_EVENT, EVENT
|
||||
from homeassistant.components.deconz.deconz_event import CONF_DECONZ_EVENT
|
||||
|
||||
from .test_gateway import DECONZ_WEB_REQUEST, setup_deconz_integration
|
||||
|
||||
@@ -62,7 +62,6 @@ async def test_deconz_events(hass):
|
||||
assert "sensor.switch_2_battery_level" in gateway.deconz_ids
|
||||
assert len(hass.states.async_all()) == 3
|
||||
assert len(gateway.events) == 5
|
||||
assert len(gateway.entities[EVENT]) == 5
|
||||
|
||||
switch_1 = hass.states.get("sensor.switch_1")
|
||||
assert switch_1 is None
|
||||
@@ -128,4 +127,3 @@ async def test_deconz_events(hass):
|
||||
|
||||
assert len(hass.states.async_all()) == 0
|
||||
assert len(gateway.events) == 0
|
||||
assert len(gateway.entities[EVENT]) == 0
|
||||
Reference in new issue
Block a user