* 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
@@ -64,7 +64,6 @@ async def test_no_switches(hass):
|
||||
gateway = await setup_deconz_integration(hass)
|
||||
assert len(gateway.deconz_ids) == 0
|
||||
assert len(hass.states.async_all()) == 0
|
||||
assert len(gateway.entities[switch.DOMAIN]) == 0
|
||||
|
||||
|
||||
async def test_switches(hass):
|
||||
@@ -78,7 +77,6 @@ async def test_switches(hass):
|
||||
assert "switch.unsupported_switch" not in gateway.deconz_ids
|
||||
assert "switch.on_off_relay" in gateway.deconz_ids
|
||||
assert len(hass.states.async_all()) == 5
|
||||
assert len(gateway.entities[switch.DOMAIN]) == 4
|
||||
|
||||
on_off_switch = hass.states.get("switch.on_off_switch")
|
||||
assert on_off_switch.state == "on"
|
||||
@@ -175,4 +173,3 @@ async def test_switches(hass):
|
||||
await gateway.async_reset()
|
||||
|
||||
assert len(hass.states.async_all()) == 0
|
||||
assert len(gateway.entities[switch.DOMAIN]) == 0
|
||||
Reference in new issue
Block a user