Esempio n. 1
0
    def setUpFactory(self):
        """
        Method is taken from atrack.packets
        Used to create factory with configs
        Configs are needed to test the packets processing (test_processData)
        """
        from lib.handlers.atrack.packets import PacketFactory
        from configparser import ConfigParser

        conf = ConfigParser()
        conf.optionxform = str
        conf.read("conf/handlers/atrack.ax5.conf")
        section = conf["settings"]
        config = {}
        for key in section.keys():
            config[key] = section[key]

        self.factory = PacketFactory(config)
Esempio n. 2
0
 def setUp(self):
     import kernel.pipe as pipe
     conf.read('conf/handlers/globalsat.gtr128.conf')
     self.handler = Handler(pipe.Manager(), None)