From 38f21946ae5e281e46d035b677b3707fe7f053dd Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 19 Nov 2023 11:11:17 -0600 Subject: [PATCH] strip unused --- kasa/tests/test_smartdevice.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kasa/tests/test_smartdevice.py b/kasa/tests/test_smartdevice.py index 33cee68b..5d0505d4 100644 --- a/kasa/tests/test_smartdevice.py +++ b/kasa/tests/test_smartdevice.py @@ -170,6 +170,14 @@ async def test_representation(dev): assert pattern.match(str(dev)) +async def test_childrens(dev): + """Make sure that children property is exposed by every device.""" + if dev.is_strip: + assert len(dev.children) > 0 + else: + assert len(dev.children) == 0 + + async def test_internal_state(dev): """Make sure the internal state returns the last update results.""" assert dev.internal_state == dev._last_update