Skip to content

Commit

Permalink
Some hound errors fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi committed Nov 26, 2017
1 parent 7987a87 commit 0bf3dca
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
12 changes: 6 additions & 6 deletions miio/tests/test_ceil.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ def test_status(self):
assert self.state().color_temperature == self.device.start_state["cct"]
assert self.state().scene == self.device.start_state["snm"]
assert self.state().delay_off_countdown == self.device.start_state["dv"]
assert self.state().smart_night_light == (self.device.start_state["bl"] == 1)
assert self.state().automatic_color_temperature == (self.device.start_state["ac"] == 1)
assert self.state().smart_night_light is (self.device.start_state["bl"] == 1)
assert self.state().automatic_color_temperature is (self.device.start_state["ac"] == 1)

def test_set_brightness(self):
def brightness():
Expand Down Expand Up @@ -112,15 +112,15 @@ def smart_night_light():
return self.device.status().smart_night_light

self.device.smart_night_light_off()
assert smart_night_light() == False
assert smart_night_light() is False
self.device.smart_night_light_on()
assert smart_night_light() == True
assert smart_night_light() is True

def test_automatic_color_temperature_on(self):
def automatic_color_temperature():
return self.device.status().automatic_color_temperature

self.device.automatic_color_temperature_on()
assert automatic_color_temperature() == True
assert automatic_color_temperature() is True
self.device.automatic_color_temperature_off()
assert automatic_color_temperature() == False
assert automatic_color_temperature() is False
24 changes: 12 additions & 12 deletions miio/tests/test_philips_eyecare.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,22 @@ def test_status(self):

assert self.is_on() is True
assert self.state().brightness == self.device.start_state["bright"]
assert self.state().reminder == (self.device.start_state["notifystatus"] == 'on')
assert self.state().ambient == (self.device.start_state["ambstatus"] == 'on')
assert self.state().reminder is (self.device.start_state["notifystatus"] == 'on')
assert self.state().ambient is (self.device.start_state["ambstatus"] == 'on')
assert self.state().ambient_brightness == self.device.start_state["ambvalue"]
assert self.state().eyecare == (self.device.start_state["eyecare"] == 'on')
assert self.state().eyecare is (self.device.start_state["eyecare"] == 'on')
assert self.state().scene == self.device.start_state["scene_num"]
assert self.state().smart_night_light == (self.device.start_state["bls"] == 'on')
assert self.state().smart_night_light is (self.device.start_state["bls"] == 'on')
assert self.state().delay_off_countdown == self.device.start_state["dvalue"]

def test_eyecare(self):
def eyecare():
return self.device.status().eyecare

self.device.eyecare_on()
assert eyecare() == True
assert eyecare() is True
self.device.eyecare_off()
assert eyecare() == False
assert eyecare() is False

def test_set_brightness(self):
def brightness():
Expand Down Expand Up @@ -141,27 +141,27 @@ def smart_night_light():
return self.device.status().smart_night_light

self.device.smart_night_light_on()
assert smart_night_light() == True
assert smart_night_light() is True
self.device.smart_night_light_off()
assert smart_night_light() == False
assert smart_night_light() is False

def test_reminder(self):
def reminder():
return self.device.status().reminder

self.device.reminder_on()
assert reminder() == True
assert reminder() is True
self.device.reminder_off()
assert reminder() == False
assert reminder() is False

def test_ambient(self):
def ambient():
return self.device.status().ambient

self.device.ambient_on()
assert ambient() == True
assert ambient() is True
self.device.ambient_off()
assert ambient() == False
assert ambient() is False

def test_set_ambient_brightness(self):
def ambient_brightness():
Expand Down

0 comments on commit 0bf3dca

Please sign in to comment.