Пример #1
0
    def setUp(self):
        super(SRBDriverTestCase, self).setUp()

        self.configuration = conf.Configuration(None)
        self._driver = srb.SRBDriver(configuration=self.configuration)
        # Stub processutils.execute for static methods
        self.stubs.Set(processutils, 'execute', self._fake_execute)
        self._driver.set_execute(self._fake_execute)
        self._configure_driver()
Пример #2
0
    def setUp(self):
        super(SRBDriverTestCase, self).setUp()

        self.configuration = conf.Configuration(None)
        self._driver = srb.SRBDriver(configuration=self.configuration)
        # Stub processutils.execute for static methods
        self.stubs.Set(processutils, 'execute', self._fake_execute)
        exec_patcher = mock.patch.object(self._driver, '_execute',
                                         self._fake_execute)
        exec_patcher.start()
        self.addCleanup(exec_patcher.stop)
        self._configure_driver()