From 11aac11ccf56ecc160e34b812f1a21ca1a8b6ad9 Mon Sep 17 00:00:00 2001 From: Sebastian Muszynski Date: Mon, 27 Nov 2017 21:25:59 +0100 Subject: [PATCH] Tests for None values fixed. --- miio/tests/test_powerstrip.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/miio/tests/test_powerstrip.py b/miio/tests/test_powerstrip.py index f1fa6e8de..a0b2228e3 100644 --- a/miio/tests/test_powerstrip.py +++ b/miio/tests/test_powerstrip.py @@ -62,18 +62,21 @@ def test_status(self): assert self.state().load_power == self.device.start_state["power_consume_rate"] def test_status_without_power_consume_rate(self): - del self.device.state["power_consume_rate"] + self.device._reset_state() + self.device.state["power_consume_rate"] = None assert self.state().load_power is None def test_status_without_current(self): - del self.device.state["current"] + self.device._reset_state() + self.device.state["current"] = None assert self.state().current is None def test_status_without_mode(self): - del self.device.state["mode"] + self.device._reset_state() + self.device.state["mode"] = None assert self.state().mode is None def test_set_power_mode(self):