]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Ensure PortSecurityDBTestCase loads correct plugin
authorSalvatore Orlando <salv.orlando@gmail.com>
Sun, 14 Jul 2013 22:23:46 +0000 (00:23 +0200)
committerSalvatore Orlando <salv.orlando@gmail.com>
Mon, 15 Jul 2013 20:44:07 +0000 (22:44 +0200)
Bug 1201569

If a plugin is passed to the setUp method, that plugin
should be loaded instead od DB_PLUGIN_KLASS

Change-Id: I81df9f62e7399f5a76a07e504679ee8311e5855e

neutron/tests/unit/test_extension_portsecurity.py

index 695fb01bb2a52e763f76325437b748ce19b0ac43..1189d13af65f1c6d44acf055e63b034107d14516 100644 (file)
@@ -180,7 +180,7 @@ class PortSecurityTestPlugin(db_base_plugin_v2.NeutronDbPluginV2,
 
 class PortSecurityDBTestCase(PortSecurityTestCase):
     def setUp(self, plugin=None):
-        test_config['plugin_name_v2'] = DB_PLUGIN_KLASS
+        test_config['plugin_name_v2'] = plugin or DB_PLUGIN_KLASS
         super(PortSecurityDBTestCase, self).setUp()
 
     def tearDown(self):