Exemplo n.º 1
0
 def test_done_open_close_state(self):
     device = DeviceMock('TestDevice')
     blind = Blind('Test', 0, 0, device, [], [])
     Close(blind).do()
     self.assertEqual(1, device.close_counter)
     self.assertEqual(State.CLOSED, device.stats())
     task = Open(blind)
     self.assertFalse(task.done())
Exemplo n.º 2
0
 def test_done_open_tilt_state(self):
     device = DeviceMock('TestDevice')
     blind = Blind('Test', 0, 0, device, [], [])
     Tilt(blind).do()
     self.assertEqual(1, device.tilt_counter)
     self.assertEqual(State.TILT, device.stats())
     task = Open(blind)
     self.assertFalse(task.done())
Exemplo n.º 3
0
 def test_done_open_open_state(self):
     device = DeviceMock('TestDevice')
     blind = Blind('Test', 0, 0, device, [], [])
     Open(blind).do()
     self.assertEqual(1, device.open_counter)
     self.assertEqual(State.OPEN, device.stats())
     task = Open(blind)
     self.assertTrue(task.done())
Exemplo n.º 4
0
 def test_done_open_moved_state(self):
     device = DeviceMock('TestDevice')
     blind = Blind('Test', 0, 0, device, [], [])
     device.move(50)
     task = Open(blind)
     self.assertFalse(task.done())