def startInputs(self, global_data): ''' Start Home Monitor Input routines ''' input_queue = global_data[Constants.GlobalData.INPUT_QUEUE] self.input = ProcessInput(input_queue) # Start thread for inputing data if (not self.options.in_test_mode): self.logger.debug('Starting xbee input') self.xbee_thread = XBeeInputThread(input_queue) self.xbee_thread.start() # The following will test various inputs if (self.options.in_test_mode): self.logger.debug('Starting test thread') self.test_input = TestInputThread(input_queue) self.test_input.start() self.logger.debug('Starting scheduler') self.sched = HMScheduler(input_queue) self.sched.start() if (sys.platform[:5] == 'linux' and not self.options.in_test_mode): self.logger.debug('Starting ComputerMonitor') self.computer_monitor = ComputerMonitor(input_queue) self.computer_monitor.start()
def test_logger_name( self ): queue = MagicMock() th = TestInputThread( queue ) self.assertEqual( th.logger_name, Constants.LogKeys.inputs )