Skip to content

Commit a9c559e

Browse files
committed
Add tests
1 parent db366a7 commit a9c559e

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/test_legacy_commands.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ def test_on(self):
2929
def test_off(self):
3030
self.assertEqual(self.commands.off(), CommandLegacy(0x3b, None, 1))
3131

32+
def test_night_light(self):
33+
sc = CommandLegacy(0x3b, None, 1)
34+
self.assertEqual(self.commands.night_light(), CommandLegacy(0xbb, None, 1, select=True, select_command=sc))
35+
3236
def test_dimmer(self):
3337
sc = CommandLegacy(0x38, None, 1)
3438
self.assertEqual(self.commands.dimmer(), CommandLegacy(0x34, None, 1, select=True, select_command=sc))
@@ -57,6 +61,10 @@ def test_on(self):
5761
def test_off(self):
5862
self.assertEqual(self.commands.off(), CommandLegacy(0x46, None, 1))
5963

64+
def test_night_light(self):
65+
sc = CommandLegacy(0x46, None, 1)
66+
self.assertEqual(self.commands.night_light(), CommandLegacy(0xc6, None, 1, select=True, select_command=sc))
67+
6068
def test_white(self):
6169
sc = CommandLegacy(0x45, None, 1)
6270
self.assertEqual(self.commands.white(), CommandLegacy(0xc5, None, 1, select=True, select_command=sc))

0 commit comments

Comments
 (0)