diff options
author | Jose Lausuch <jose.lausuch@ericsson.com> | 2017-06-21 08:33:02 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-06-21 08:33:02 +0000 |
commit | 51899de7927bbf6be76639508ae2970046add625 (patch) | |
tree | a2cc98e1a98b012e81d82ac8653932c00ea8ba3e /functest/tests/unit/openstack | |
parent | e7ab53553d719b0fb35b4a74cd0bbc9572c7a48d (diff) | |
parent | 997a42438f2253aa9fe640c1cbdd8ea461901948 (diff) |
Merge "Remove all references to /home/opnfv/repos/functest"
Diffstat (limited to 'functest/tests/unit/openstack')
-rw-r--r-- | functest/tests/unit/openstack/refstack_client/test_refstack_client.py | 14 | ||||
-rw-r--r-- | functest/tests/unit/openstack/tempest/test_conf_utils.py | 3 |
2 files changed, 6 insertions, 11 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 8c149baa..3a121245 100644 --- a/functest/tests/unit/openstack/refstack_client/test_refstack_client.py +++ b/functest/tests/unit/openstack/refstack_client/test_refstack_client.py @@ -7,7 +7,7 @@ import logging import mock -import os +import pkg_resources import unittest from functest.core import testcase @@ -17,12 +17,11 @@ from functest.utils.constants import CONST class OSRefstackClientTesting(unittest.TestCase): - _config = os.path.join( - CONST.__getattribute__('dir_functest_test'), - CONST.__getattribute__('refstack_tempest_conf_path')) - _testlist = os.path.join( - CONST.__getattribute__('dir_functest_test'), - CONST.__getattribute__('refstack_defcore_list')) + _config = pkg_resources.resource_filename( + 'functest', + 'opnfv_tests/openstack/refstack_client/refstack_tempest.conf') + _testlist = pkg_resources.resource_filename( + 'functest', 'opnfv_tests/openstack/refstack_client/defcore.txt') def setUp(self): self.defaultargs = {'config': self._config, @@ -30,7 +29,6 @@ class OSRefstackClientTesting(unittest.TestCase): self.refstackclient = refstack_client.RefstackClient() def test_source_venv(self): - CONST.__setattr__('dir_refstack_client', 'test_repo_dir') with mock.patch('functest.opnfv_tests.openstack.refstack_client.' 'refstack_client.ft_utils.execute_command') as m: cmd = ("cd {0};" diff --git a/functest/tests/unit/openstack/tempest/test_conf_utils.py b/functest/tests/unit/openstack/tempest/test_conf_utils.py index 23f6e45c..37904965 100644 --- a/functest/tests/unit/openstack/tempest/test_conf_utils.py +++ b/functest/tests/unit/openstack/tempest/test_conf_utils.py @@ -238,8 +238,6 @@ class OSTempestConfUtilsTesting(unittest.TestCase): mock.patch('__builtin__.open', mock.mock_open()), \ mock.patch('functest.opnfv_tests.openstack.tempest.' 'conf_utils.shutil.copyfile'): - CONST.__setattr__('dir_functest_test', 'test_dir') - CONST.__setattr__('refstack_tempest_conf_path', 'test_path') conf_utils.configure_tempest_defcore('test_dep_dir', img_flavor_dict) mset.assert_any_call('compute', 'image_ref', 'test_image_id') @@ -264,7 +262,6 @@ class OSTempestConfUtilsTesting(unittest.TestCase): mock.patch('__builtin__.open', mock.mock_open()), \ mock.patch('functest.opnfv_tests.openstack.tempest.' 'conf_utils.backup_tempest_config'): - CONST.__setattr__('dir_functest_test', 'test_dir') CONST.__setattr__('OS_ENDPOINT_TYPE', None) conf_utils.\ configure_tempest_update_params('test_conf_file', |