Fix test case bug

Explicitly register "core_plugin" option in test cases, otherwise
unit test will complain "Neutron core_plugin not configured!".

Change-Id: Iee01d6f2e9a4fb202a10e8635afb6dc314d65bcc
This commit is contained in:
zhiyuan_cai 2016-03-08 09:46:01 +08:00
parent b350bfe6ba
commit cc05f07ecb
1 changed files with 3 additions and 0 deletions

View File

@ -1305,6 +1305,9 @@ class PluginTest(unittest.TestCase):
@patch.object(context, 'get_context_from_neutron_context')
def test_create_external_network(self, mock_context):
plugin_path = 'tricircle.tests.unit.network.test_plugin.FakePlugin'
cfg.CONF.set_override('core_plugin', plugin_path)
self._basic_pod_route_setup()
fake_plugin = FakePlugin()