def setUp(self): self.action = AlertOnHumidityOutOfRange(35, 50, 3) self.zone1 = Zone('great room', [], Level.FIRST_FLOOR).addDevice(HumiditySensor(ITEMS[0])) AlertManager._setTestMode(True) AlertManager.reset() cast_manager._setTestMode(True)
def setUp(self): self.action = AlertOnTemperatureOutOfRange(35, 50, 3) self.zone1 = Zone('great room').addDevice(TemperatureSensor(ITEMS[0])) AlertManager._setTestMode(True) AlertManager.reset() cast_manager._setTestMode(True)
def setUp(self): self.action = AlertOnHighGasLevel() self.zone1 = Zone('great room', [], Level.FIRST_FLOOR).addDevice( SmokeSensor(ITEMS[1], ITEMS[0])) # index reverse order intentionally ITEMS[0].setState(scope.OnOffType.OFF) AlertManager._setTestMode(True) AlertManager.reset() cast_manager._setTestMode(True)
def tearDown(self): cast_manager._setTestMode(False) AlertManager._setTestMode(False)
def setUp(self): AlertManager._setTestMode(True) AlertManager.reset() cast_manager._setTestMode(True)