def setUp(self): super(ServerSideRpcBackendTest, self).setUp() self._mgr = mock.Mock() self.useFixture( fixture.CallbackRegistryFixture(callback_manager=self._mgr)) self.register_mock = mock.patch.object( resource_manager.ResourceCallbacksManager, "register").start()
def setUp(self): """Setup test.""" self.useFixture(base.OpenDaylightRestClientFixture()) self.useFixture(base.OpenDaylightFeaturesFixture()) self.useFixture(base.OpenDaylightPseudoAgentPrePopulateFixture()) self.useFixture(OpenDaylightAgentDBFixture()) super(TestPseudoAgentDBBindingController, self).setUp() self.useFixture(fixture.CallbackRegistryFixture()) self.mgr = pseudo_agentdb_binding.PseudoAgentDBBindingController()
def setUp(self): self.useFixture(base.OpenDaylightRestClientFixture()) self.useFixture(OpenDaylightAgentDBFixture()) super(TestPseudoAgentDBBindingPrePopulate, self).setUp() self.useFixture(fixture.CallbackRegistryFixture()) self.ml2_plugin = mock.Mock() self.ml2_plugin.get_agents = mock.Mock(return_value=[]) self.worker = mock.Mock() self.worker.known_agent = mock.Mock(return_value=False) self.worker.add_known_agent = mock.Mock() self.worker.update_agetns_db_row = mock.Mock() self.prepopulate = (pseudo_agentdb_binding. PseudoAgentDBBindingPrePopulate(self.worker))
def setUp(self): super(BaseTestCase, self).setUp() self.useFixture(lockutils.ExternalLockFixture()) self.useFixture(fixture.APIDefinitionFixture()) config.register_common_config_options() cfg.CONF.set_override('state_path', self.get_default_temp_dir().path) self.addCleanup(CONF.reset) self.useFixture(ProcessMonitorFixture()) self.useFixture( fixtures.MonkeyPatch( 'neutron_lib.exceptions.NeutronException.use_fatal_exceptions', fake_use_fatal_exceptions)) self.useFixture( fixtures.MonkeyPatch( 'oslo_config.cfg.find_config_files', lambda project=None, prog=None, extension=None: [])) self.useFixture(fixture.RPCFixture()) self.setup_config() self._callback_manager = registry_manager.CallbacksManager() self.useFixture( fixture.CallbackRegistryFixture( callback_manager=self._callback_manager)) # Give a private copy of the directory to each test. self.useFixture(fixture.PluginDirectoryFixture()) policy.init(suppress_deprecation_warnings=True) self.addCleanup(policy.reset) self.addCleanup(resource_registry.unregister_all_resources) self.addCleanup(db_api.sqla_remove_all) self.addCleanup(rpc_consumer_reg.clear) self.addCleanup(rpc_producer_reg.clear) self.addCleanup(profiler.clean)
def setUp(self): super(TestBaseWorker, self).setUp() self._reg = mock.Mock() self.useFixture( fixture.CallbackRegistryFixture(callback_manager=self._reg))
def setUp(self): super(CallbackRegistryFixtureTestCase, self).setUp() self.manager = mock.Mock() self.useFixture( fixture.CallbackRegistryFixture(callback_manager=self.manager))
def setUp(self): super(TestHandleResourceCallback, self).setUp() self._cb_mgr = mock.Mock() self.useFixture( fixture.CallbackRegistryFixture(callback_manager=self._cb_mgr)) self.driver_manager = driver_mgr.LoggingServiceDriverManager()
def setUp(self): super(TestCallbackRegistryDispatching, self).setUp() self.callback_manager = mock.Mock() self.registry_fixture = fixture.CallbackRegistryFixture( callback_manager=self.callback_manager) self.useFixture(self.registry_fixture)
def setUp(self): super(CapabilitiesTest, self).setUp() self._mgr = mock.Mock() self.useFixture( fixture.CallbackRegistryFixture(callback_manager=self._mgr))