Merge "Start instances using fixed network when possible"
diff --git a/tempest/tests/common/test_cred_provider.py b/tempest/tests/common/test_cred_provider.py
index 4059a1d..76430ac 100644
--- a/tempest/tests/common/test_cred_provider.py
+++ b/tempest/tests/common/test_cred_provider.py
@@ -17,11 +17,13 @@
from tempest import auth
from tempest.common import cred_provider
from tempest.common import tempest_fixtures as fixtures
+from tempest import config
from tempest.services.identity.v2.json import token_client as v2_client
from tempest.services.identity.v3.json import token_client as v3_client
+from tempest.tests import fake_config
from tempest.tests import fake_identity
-# Note: eventually the auth module will move to tempest-lib, and so wil its
-# unit tests. *CredentialsTests will be imported from tempest-lib then.
+# Note(andreaf): once credentials tests move to tempest-lib, I will copy the
+# parts of them required by these here.
from tempest.tests import test_credentials as test_creds
@@ -39,6 +41,8 @@
def setUp(self):
super(ConfiguredV2CredentialsTests, self).setUp()
+ self.useFixture(fake_config.ConfigFixture())
+ self.stubs.Set(config, 'TempestConfigPrivate', fake_config.FakePrivate)
self.stubs.Set(self.tokenclient_class, 'raw_request',
self.identity_response)
diff --git a/tempest/tests/test_credentials.py b/tempest/tests/test_credentials.py
index 350b190..bf44d11 100644
--- a/tempest/tests/test_credentials.py
+++ b/tempest/tests/test_credentials.py
@@ -16,13 +16,10 @@
import copy
from tempest import auth
-from tempest.common import tempest_fixtures as fixtures
-from tempest import config
from tempest import exceptions
from tempest.services.identity.v2.json import token_client as v2_client
from tempest.services.identity.v3.json import token_client as v3_client
from tempest.tests import base
-from tempest.tests import fake_config
from tempest.tests import fake_identity
@@ -47,11 +44,6 @@
else:
self.assertIsNone(getattr(credentials, attr))
- def setUp(self):
- super(CredentialsTests, self).setUp()
- self.useFixture(fake_config.ConfigFixture())
- self.stubs.Set(config, 'TempestConfigPrivate', fake_config.FakePrivate)
-
def test_create(self):
creds = self._get_credentials()
self.assertEqual(self.attributes, creds._initial)
@@ -91,12 +83,10 @@
self._check(creds, credentials_class, filled)
def test_get_credentials(self):
- self.useFixture(fixtures.LockFixture('auth_version'))
self._verify_credentials(credentials_class=self.credentials_class,
creds_dict=self.attributes)
def test_get_credentials_not_filled(self):
- self.useFixture(fixtures.LockFixture('auth_version'))
self._verify_credentials(credentials_class=self.credentials_class,
creds_dict=self.attributes,
filled=False)