Convert fake_config class to use config fixture
This commit changes the fake_config object used in the unit tests to
use the config fixture and use the real config defaults by registering
the config options and using the oslo config set_default method to
override the defaults when needed for testing. This will enable reusing
the tempest defaults in most places which should save effort duplicating
defaults in the fake object.
Partially Implements bp unit-tests
Change-Id: Ib9ee8e68f7000bfbcd3cd1c94cca103a3286ec77
diff --git a/tempest/tests/test_auth.py b/tempest/tests/test_auth.py
index df04d65..b6e15bd 100644
--- a/tempest/tests/test_auth.py
+++ b/tempest/tests/test_auth.py
@@ -42,7 +42,8 @@
def setUp(self):
super(BaseAuthTestsSetUp, self).setUp()
- self.stubs.Set(config, 'TempestConfigPrivate', fake_config.FakeConfig)
+ self.useFixture(fake_config.ConfigFixture())
+ self.stubs.Set(config, 'TempestConfigPrivate', fake_config.FakePrivate)
self.fake_http = fake_http.fake_httplib2(return_type=200)
self.stubs.Set(http.ClosingHttp, 'request', self.fake_http.request)
self.auth_provider = self._auth(self.credentials)