aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-02-12 11:22:06 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-02-12 11:22:06 +0100
commite7eee58cd132f4f68cdf3e319bae6b0283fd2678 (patch)
treeca0dc4317c0b2c8ca5eb2e79597c36dde86c22cc /functest/tests
parent8d83b91049f4b2f3da6b77d39105a2213a8ce690 (diff)
Export env vars via os.environ in test_openstack_utils.py
CONST shouldn't be used for getting/setting env vars. It adds complexity and may raise side effects. Change-Id: I8319748dd2f0abb95b82a2f65191cac8ccba7f5e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/tests')
-rw-r--r--functest/tests/unit/utils/test_openstack_utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/functest/tests/unit/utils/test_openstack_utils.py b/functest/tests/unit/utils/test_openstack_utils.py
index 0a7177fc..259e60d5 100644
--- a/functest/tests/unit/utils/test_openstack_utils.py
+++ b/functest/tests/unit/utils/test_openstack_utils.py
@@ -9,12 +9,12 @@
import copy
import logging
+import os
import unittest
import mock
from functest.utils import openstack_utils
-from functest.utils.constants import CONST
class OSUtilsTesting(unittest.TestCase):
@@ -1577,7 +1577,7 @@ class OSUtilsTesting(unittest.TestCase):
def test_create_tenant_default(self):
with mock.patch('functest.utils.openstack_utils.'
'is_keystone_v3', return_value=True):
- CONST.__setattr__('OS_PROJECT_DOMAIN_NAME', 'Default')
+ os.environ['OS_PROJECT_DOMAIN_NAME'] = 'Default'
self.assertEqual(openstack_utils.
create_tenant(self.keystone_client,
'test_tenant',