Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi committed Jan 7, 2019
1 parent 199d1dd commit f90d333
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions miio/tests/test_airhumidifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@ def led_brightness():
self.device.set_led_brightness(LedBrightness.Off)
assert led_brightness() == LedBrightness.Off

def test_set_led(self):
def led_brightness():
return self.device.status().led_brightness

self.device.set_led(True)
assert led_brightness() == LedBrightness.Bright

self.device.set_led(False)
assert led_brightness() == LedBrightness.Off

def test_set_buzzer(self):
def buzzer():
return self.device.status().buzzer
Expand Down Expand Up @@ -343,6 +353,16 @@ def led_brightness():
self.device.set_led_brightness(LedBrightness.Off)
assert led_brightness() == LedBrightness.Off

def test_set_led(self):
def led_brightness():
return self.device.status().led_brightness

self.device.set_led(True)
assert led_brightness() == LedBrightness.Bright

self.device.set_led(False)
assert led_brightness() == LedBrightness.Off

def test_set_buzzer(self):
def buzzer():
return self.device.status().buzzer
Expand Down

0 comments on commit f90d333

Please sign in to comment.