diff options
Diffstat (limited to 'functest/tests')
-rw-r--r-- | functest/tests/unit/core/test_feature.py | 4 | ||||
-rw-r--r-- | functest/tests/unit/openstack/tempest/test_conf_utils.py | 5 | ||||
-rw-r--r-- | functest/tests/unit/vnf/ims/test_cloudify_ims.py | 9 | ||||
-rw-r--r-- | functest/tests/unit/vnf/ims/test_orchestra_ims.py | 2 | ||||
-rw-r--r-- | functest/tests/unit/vnf/rnc/__init__.py | 0 |
5 files changed, 14 insertions, 6 deletions
diff --git a/functest/tests/unit/core/test_feature.py b/functest/tests/unit/core/test_feature.py index 988981ef..553a5dfa 100644 --- a/functest/tests/unit/core/test_feature.py +++ b/functest/tests/unit/core/test_feature.py @@ -22,8 +22,8 @@ class FeatureTestingBase(unittest.TestCase): _case_name = "foo" _project_name = "bar" - _repo = "dir_repo_copper" - _cmd = "cd /home/opnfv/repos/foo/tests && bash run.sh && cd -" + _repo = "dir_repo_bar" + _cmd = "cd /home/opnfv/repos/bar/tests && bash run.sh && cd -" _output_file = '/home/opnfv/functest/results/foo.log' feature = None diff --git a/functest/tests/unit/openstack/tempest/test_conf_utils.py b/functest/tests/unit/openstack/tempest/test_conf_utils.py index 37904965..79ef9915 100644 --- a/functest/tests/unit/openstack/tempest/test_conf_utils.py +++ b/functest/tests/unit/openstack/tempest/test_conf_utils.py @@ -261,8 +261,11 @@ class OSTempestConfUtilsTesting(unittest.TestCase): 'write') as mwrite, \ mock.patch('__builtin__.open', mock.mock_open()), \ mock.patch('functest.opnfv_tests.openstack.tempest.' - 'conf_utils.backup_tempest_config'): + 'conf_utils.backup_tempest_config'), \ + mock.patch('functest.utils.functest_utils.yaml.safe_load') \ + as mock_yaml: CONST.__setattr__('OS_ENDPOINT_TYPE', None) + mock_yaml.return_value = mock.Mock() conf_utils.\ configure_tempest_update_params('test_conf_file', IMAGE_ID=image_id, diff --git a/functest/tests/unit/vnf/ims/test_cloudify_ims.py b/functest/tests/unit/vnf/ims/test_cloudify_ims.py index 537c5146..f0483c69 100644 --- a/functest/tests/unit/vnf/ims/test_cloudify_ims.py +++ b/functest/tests/unit/vnf/ims/test_cloudify_ims.py @@ -13,6 +13,8 @@ import mock from functest.core import vnf from functest.opnfv_tests.vnf.ims import cloudify_ims +from snaps.openstack.os_credentials import OSCreds + class CloudifyImsTesting(unittest.TestCase): @@ -79,8 +81,11 @@ class CloudifyImsTesting(unittest.TestCase): @mock.patch('snaps.openstack.create_image.OpenStackImage.create') def test_prepare_bad_auth_url(self, *args): with self.assertRaises(Exception): - self.ims_vnf.prepare() - args[0].assert_not_called() + self.ims_vnf.image_creator( + OSCreds(username='user', password='pass', auth_url='url', + project_name='project', identity_api_version=3), + mock.Mock()) + args[0].assert_not_called() def test_prepare_missing_param(self): with self.assertRaises(vnf.VnfPreparationException): diff --git a/functest/tests/unit/vnf/ims/test_orchestra_ims.py b/functest/tests/unit/vnf/ims/test_orchestra_ims.py index 21999730..5a1efc7f 100644 --- a/functest/tests/unit/vnf/ims/test_orchestra_ims.py +++ b/functest/tests/unit/vnf/ims/test_orchestra_ims.py @@ -154,7 +154,7 @@ class OrchestraImsTesting(unittest.TestCase): """Testing prepare function with bad auth url""" with self.assertRaises(Exception): self.ims_vnf.prepare() - args[0].assert_not_called() + args[0].assert_not_called() def test_prepare_missing_param(self): """Testing prepare function with missing param""" diff --git a/functest/tests/unit/vnf/rnc/__init__.py b/functest/tests/unit/vnf/rnc/__init__.py deleted file mode 100644 index e69de29b..00000000 --- a/functest/tests/unit/vnf/rnc/__init__.py +++ /dev/null |