def setUp(self):
     self.tearDown()
     ModuleTestCaseMixIn.setUp(self)
     WorkerConnectionManagerMixin.setUp(self)
     
     self.wm = worker_manager.WorkerManager()
     self.manager.register(self.wm)
     self.wm.master = RemoteProxy('master')
     
     # monkey patch Popen so that it does not actually start processes
     worker_manager.Popen = PopenProxyFactory()
     self.popen = worker_manager.Popen
     
     # monkey patch WorkerAvatar so WorkerAvatarProxy are used instead
     worker_manager.WorkerAvatar = WorkerAvatarProxy
Esempio n. 2
0
 def setUp(self):
     ModuleTestCaseMixIn.setUp(self)
     
     # Munge both task directories to be under our control and also
     # different for each unit test.
     pydra_settings.TASKS_DIR = tempfile.mkdtemp()
     pydra_settings.TASKS_DIR_INTERNAL = tempfile.mkdtemp()
     
     # Lazy-inited, with no autodiscovery.
     self.task_manager = TaskManager(None, lazy_init=True)
     self.manager.register(self.task_manager)
     
     # Make a test package with a single file
     self.packages = []
     self.tasks = []
     self.create_package()
     self.create_file()
     
     # Save test package information for later.
     self.package_name = 'test'
     self.package_dir_internal = os.path.join( \
         self.task_manager.tasks_dir_internal, self.package_name)
     self.task = 'test.testmodule.TestTask'
Esempio n. 3
0
 def setUp(self):
     ModuleTestCaseMixIn.setUp(self)
     self.twisted_web_interface = TwistedWebInterface()
     self.manager.register(self.twisted_web_interface)
 def setUp(self):
     self.tearDown()
     ModuleTestCaseMixIn.setUp(self)
     MasterConnectionManagerMixin.setUp(self)