Merge "Isolate test from environment variables"

This commit is contained in:
Jenkins 2014-11-18 08:41:48 +00:00 committed by Gerrit Code Review
commit 63f6d1e851
1 changed files with 7 additions and 1 deletions

View File

@ -78,13 +78,19 @@ class GetClientTestCase(utils.BaseTestCase):
def setUp(self):
super(GetClientTestCase, self).setUp()
self.host = 'test_host'
self.env = os.environ.copy()
os.environ.clear()
def tearDown(self):
os.environ = self.env
super(GetClientTestCase, self).tearDown()
def test_get_client_host_only(self):
expected_creds = {
'username': None,
'password': None,
'tenant': None,
'auth_url': os.getenv('OS_AUTH_URL'),
'auth_url': None,
'strategy': 'noauth',
'region': None
}