Tests: reset config after each test

In some cases, unit tests must override configuration values.  The
base.TestCase now resets the config between tests.

Change-Id: I6b82792af9beac069b87706a81b63e64495a8d9d
This commit is contained in:
Peter Balland 2014-08-14 08:21:19 -07:00
parent f7a48a20be
commit d5699c559a
1 changed files with 2 additions and 0 deletions

View File

@ -18,6 +18,7 @@
import os
import fixtures
from oslo.config import cfg
import testtools
from congress.common import config
@ -36,6 +37,7 @@ class TestCase(testtools.TestCase):
super(TestCase, self).setUp()
config.init([], default_config_files=[])
self.addCleanup(cfg.CONF.reset)
config.setup_logging()
test_timeout = os.environ.get('OS_TEST_TIMEOUT', 0)