tests: stop overwriting neutron BaseTestCase configuration files

It's ok to expect configuration files that are passed by neutron's
BaseTestCase, since they are located in the python package itself (under
site-packages).

Related-Bug: #1433146
Change-Id: If1f5ebd981cf06558d5102524211799676068889
This commit is contained in:
Ihar Hrachyshka 2015-03-17 23:58:18 +01:00
parent 713fcd31a7
commit 832296a00f
1 changed files with 2 additions and 20 deletions

View File

@ -14,31 +14,13 @@
# under the License.
#
import os
import neutron
from neutron.tests import base as n_base
from neutron.tests.unit import test_db_plugin
from oslo_config import cfg
def override_nvalues():
neutron_path = os.path.abspath(
os.path.join(os.path.dirname(neutron.__file__), os.pardir))
neutron_policy = os.path.join(neutron_path, 'etc/policy.json')
cfg.CONF.set_override('policy_file', neutron_policy)
class BaseTestCase(n_base.BaseTestCase):
def setUp(self):
override_nvalues()
super(BaseTestCase, self).setUp()
pass
class NeutronDbPluginV2TestCase(test_db_plugin.NeutronDbPluginV2TestCase):
def setUp(self, plugin=None, service_plugins=None, ext_mgr=None):
override_nvalues()
super(NeutronDbPluginV2TestCase, self).setUp(
plugin, service_plugins, ext_mgr)
pass