def runner(self): """ Returns: pyshelf.bulk_update.runner.Runner """ if not self._runner: self._runner = Runner(self) return self._runner
def setUp(self): super(RunnerTest, self).setUp() self.fake_process = type("FakeProcess", (object, ), {})() self.fake_process = Mock() self.fake_container = type("FakeContainer", (object, ), {})() self.fake_container.config = {} self.fake_process_constructor = Mock(return_value=self.fake_process) MonkeyPatcher.patch(multiprocessing, "Process", self.fake_process_constructor) self.runner = Runner(self.fake_container)