예제 #1
0
 def test_is_thermostat(self):
     device = MaxDevice()
     device.type = MAX_CUBE
     self.assertEqual(False, self.cube.is_thermostat(device))
     device.type = MAX_THERMOSTAT
     self.assertEqual(True, self.cube.is_thermostat(device))
     device.type = MAX_THERMOSTAT_PLUS
     self.assertEqual(True, self.cube.is_thermostat(device))
예제 #2
0
 def test_is_thermostat(self):
     device = MaxDevice()
     device.type = MAX_CUBE
     self.assertEqual(False, self.cube.is_thermostat(device))
     device.type = MAX_THERMOSTAT
     self.assertEqual(True, self.cube.is_thermostat(device))
     device.type = MAX_THERMOSTAT_PLUS
     self.assertEqual(True, self.cube.is_thermostat(device))
예제 #3
0
 def test_is_window_shutter(self):
     device = MaxDevice()
     device.type = MAX_CUBE
     self.assertEqual(False, self.cube.is_windowshutter(device))
     device.type = MAX_THERMOSTAT
     self.assertEqual(False, self.cube.is_windowshutter(device))
     device.type = MAX_THERMOSTAT_PLUS
     self.assertEqual(False, self.cube.is_windowshutter(device))
     device.type = MAX_WALL_THERMOSTAT
     self.assertEqual(False, self.cube.is_windowshutter(device))
     device.type = MAX_WINDOW_SHUTTER
     self.assertEqual(True, self.cube.is_windowshutter(device))
예제 #4
0
 def test_is_wall_thermostat(self):
     device = MaxDevice()
     device.type = MAX_CUBE
     self.assertEqual(False, self.cube.is_wallthermostat(device))
     device.type = MAX_THERMOSTAT
     self.assertEqual(False, self.cube.is_wallthermostat(device))
     device.type = MAX_THERMOSTAT_PLUS
     self.assertEqual(False, self.cube.is_wallthermostat(device))
     device.type = MAX_WALL_THERMOSTAT
     self.assertEqual(True, self.cube.is_wallthermostat(device))
     device.type = MAX_WINDOW_SHUTTER
     self.assertEqual(False, self.cube.is_wallthermostat(device))
예제 #5
0
 def test_is_window_shutter(self, _):
     device = MaxDevice()
     device.type = MAX_CUBE
     self.assertFalse(device.is_windowshutter())
     device.type = MAX_THERMOSTAT
     self.assertFalse(device.is_windowshutter())
     device.type = MAX_THERMOSTAT_PLUS
     self.assertFalse(device.is_windowshutter())
     device.type = MAX_WALL_THERMOSTAT
     self.assertFalse(device.is_windowshutter())
     device.type = MAX_WINDOW_SHUTTER
     self.assertTrue(device.is_windowshutter())
예제 #6
0
 def test_is_wall_thermostat(self, _):
     device = MaxDevice()
     device.type = MAX_CUBE
     self.assertFalse(device.is_wallthermostat())
     device.type = MAX_THERMOSTAT
     self.assertFalse(device.is_wallthermostat())
     device.type = MAX_THERMOSTAT_PLUS
     self.assertFalse(device.is_wallthermostat())
     device.type = MAX_WALL_THERMOSTAT
     self.assertTrue(device.is_wallthermostat())
     device.type = MAX_WINDOW_SHUTTER
     self.assertFalse(device.is_wallthermostat())