Skip to content

Commit

Permalink
Additional cases added.
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi committed Jan 26, 2018
1 parent b5b1e77 commit f761f6c
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions miio/tests/test_airconditioningcompanion.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def test_learn_result(self):
assert self.device.learn_result() is True

def test_learn_stop(self):
assert self.device.learn(STORAGE_SLOT_ID) is True
assert self.device.learn() is True
assert self.device.lern_stop(STORAGE_SLOT_ID) is True
assert self.device.learn_stop() is True

def test_send_ir_code(self):
assert self.device.send_ir_code('0000000') is True
Expand All @@ -94,13 +94,33 @@ def test_send_command(self):
assert self.device.send_command('0000000') is True

def test_send_configuration(self):
def send_configuration():
def send_configuration_known_aircondition():
return self.device.send_configuration(
'0100010727',
Power.On,
OperationMode.Auto,
22.5,
FanSpeed.Low,
SwingMode.On)

def send_configuration_known_aircondition_turn_off():
return self.device.send_configuration(
'0100010727',
Power.Off,
OperationMode.Auto,
22.5,
FanSpeed.Low,
SwingMode.On)

def send_configuration_unknown_aircondition():
return self.device.send_configuration(
'01000fffff',
Power.On,
OperationMode.Auto,
22.5,
FanSpeed.Low,
SwingMode.On)

assert send_configuration() is True
assert send_configuration_known_aircondition() is True
assert send_configuration_known_aircondition_turn_off() is True
assert send_configuration_unknown_aircondition() is True

0 comments on commit f761f6c

Please sign in to comment.