def test_start_zigbee(self, step, thread, queue): # setup options = 1 cont = ZigBeeControl() queue.return_value = 1 # run cont.startZigBee(options) # test queue.assert_called_with('ZigBeeInput') thread.assert_called_with(1, 1) step.assert_called_with(1)
def startOutputs(self, global_data): self.logger.debug('Start output communications to COSM') self.cosm = COSMControl() self.cosm.startCOSM(self.options) self.logger.debug('Start the XML RPC server') self.xmlrpc = XMLRPCControl( global_data[Constants.GlobalData.CURRENT_VALUES], global_data[Constants.GlobalData.INPUT_QUEUE], global_data[Constants.GlobalData.OPTIONS]) self.xmlrpc.startXMLRPC(self.options) # Start thread for outputing data self.logger.debug('Start output communications with ZigBee') self.zigbee = ZigBeeControl() self.zigbee.startZigBee(self.options.in_test_mode)
def test_logger_name(self): zig = ZigBeeControl() self.assertEqual(Constants.LogKeys.outputsZigBee, zig.logger_name)