diff options
Diffstat (limited to 'functest/tests/unit/openstack')
-rw-r--r-- | functest/tests/unit/openstack/refstack_client/test_refstack_client.py | 8 | ||||
-rw-r--r-- | functest/tests/unit/openstack/tempest/test_conf_utils.py | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/functest/tests/unit/openstack/refstack_client/test_refstack_client.py b/functest/tests/unit/openstack/refstack_client/test_refstack_client.py index a7a914cb..e2e7dceb 100644 --- a/functest/tests/unit/openstack/refstack_client/test_refstack_client.py +++ b/functest/tests/unit/openstack/refstack_client/test_refstack_client.py @@ -10,6 +10,7 @@ # pylint: disable=missing-docstring import logging +import os import unittest import mock @@ -18,7 +19,6 @@ import pkg_resources from functest.core import testcase from functest.opnfv_tests.openstack.refstack_client.refstack_client import \ RefstackClient, RefstackClientParser -from functest.utils.constants import CONST from snaps.openstack.os_credentials import OSCreds @@ -39,8 +39,8 @@ class OSRefstackClientTesting(unittest.TestCase): def setUp(self): self.default_args = {'config': self._config, 'testlist': self._testlist} - CONST.__setattr__('OS_AUTH_URL', 'https://ip:5000/v3') - CONST.__setattr__('OS_INSECURE', 'true') + os.environ['OS_AUTH_URL'] = 'https://ip:5000/v3' + os.environ['OS_INSECURE'] = 'true' self.case_name = 'refstack_defcore' self.result = 0 self.os_creds = OSCreds( @@ -70,7 +70,7 @@ class OSRefstackClientTesting(unittest.TestCase): m_cmd.assert_any_call(cmd) def test_run_defcore(self): - CONST.__setattr__('OS_AUTH_URL', 'http://ip:5000/v3') + os.environ['OS_AUTH_URL'] = 'http://ip:5000/v3' insecure = '' config = 'tempest.conf' testlist = 'testlist' diff --git a/functest/tests/unit/openstack/tempest/test_conf_utils.py b/functest/tests/unit/openstack/tempest/test_conf_utils.py index 5fed742c..323a1ee0 100644 --- a/functest/tests/unit/openstack/tempest/test_conf_utils.py +++ b/functest/tests/unit/openstack/tempest/test_conf_utils.py @@ -259,8 +259,9 @@ class OSTempestConfUtilsTesting(unittest.TestCase): mock.patch('functest.opnfv_tests.openstack.tempest.' 'conf_utils.shutil.copyfile'): conf_utils.configure_tempest_defcore( - 'test_dep_dir', 'test_image_id', 'test_flavor_id', - 'test_image_alt_id', 'test_flavor_alt_id', 'test_tenant_id') + 'test_dep_dir', 'test_network_name', 'test_image_id', + 'test_flavor_id', 'test_image_alt_id', 'test_flavor_alt_id', + 'test_tenant_id') mset.assert_any_call('compute', 'image_ref', 'test_image_id') mset.assert_any_call('compute', 'image_ref_alt', 'test_image_alt_id') |