def run(self): self.logger.debug('Setting up global_data') global_data = {} global_data[Constants.GlobalData.CURRENT_VALUES] = CurrentValues() global_data[Constants.GlobalData.OPTIONS] = self.options global_data[Constants.GlobalData.ARGS] = self.args global_data[Constants.GlobalData.START_TIME] = datetime.utcnow() global_data[Constants.GlobalData.INPUT_QUEUE] = HMQueue("Input") self.module_loader = ModuleLoader() self.module_loader.load(global_data) self.startOutputs(global_data) self.startInputs(global_data) self.pubAid = PubSubAid() # Endless loop will never return self.input.input() self.logger.debug("Exiting")
def test_step( self ): pubsubaid = PubSubAid() pubsubaid.step() pubsubaid = None
def test_outputs( self ): pubsubaid = PubSubAid() pubsubaid.outputs() pubsubaid = None
def test_all_topics( self ): pubsubaid = PubSubAid() pubsubaid.all_topics() pubsubaid = None
def test_init( self, sub ): pubsubaid = PubSubAid() sub.assert_any_call( pubsubaid.step, Constants.TopicNames.Step ) sub.assert_any_call( pubsubaid.outputs, Constants.TopicNames.Outputs ) sub.assert_any_call( pubsubaid.all_topics, Constants.TopicNames.ALL_TOPICS ) pubsubaid = None