Esempio n. 1
0
    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")
Esempio n. 2
0
 def test_step( self ):
     pubsubaid = PubSubAid()
     pubsubaid.step()
     pubsubaid = None
Esempio n. 3
0
 def test_outputs( self ):
     pubsubaid = PubSubAid()
     pubsubaid.outputs()
     pubsubaid = None
Esempio n. 4
0
 def test_all_topics( self ):
     pubsubaid = PubSubAid()
     pubsubaid.all_topics()
     pubsubaid = None
Esempio n. 5
0
 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