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))
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))
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))
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())
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())