diff options
author | Serena Feng <feng.xiaowei@zte.com.cn> | 2018-02-01 13:52:46 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-02-01 13:52:46 +0000 |
commit | 416461c30d5a9a0df38e6c1bdef7061fce2c7eaf (patch) | |
tree | 7c6b5625b9179f7a1d87429e57f1d3cbe803496b /functest/tests | |
parent | 834c2cd75b7af478e7456f9fd7a344b5ccf92665 (diff) | |
parent | 599aa4d480087e9ac24a67467f32431f18fe6d73 (diff) |
Merge "Use snaps_utils to get credentials in tempest"
Diffstat (limited to 'functest/tests')
-rw-r--r-- | functest/tests/unit/openstack/tempest/test_conf_utils.py | 6 | ||||
-rw-r--r-- | functest/tests/unit/openstack/tempest/test_tempest.py | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/functest/tests/unit/openstack/tempest/test_conf_utils.py b/functest/tests/unit/openstack/tempest/test_conf_utils.py index 137b9da6..1c168032 100644 --- a/functest/tests/unit/openstack/tempest/test_conf_utils.py +++ b/functest/tests/unit/openstack/tempest/test_conf_utils.py @@ -33,7 +33,8 @@ class OSTempestConfUtilsTesting(unittest.TestCase): @mock.patch('snaps.openstack.utils.deploy_utils.create_image', return_value=mock.Mock()) def test_create_tempest_resources_missing_network_dic(self, *mock_args): - tempest_resources = tempest.TempestResourcesManager(os_creds={}) + tempest_resources = tempest.TempestResourcesManager( + os_creds=self.os_creds) with self.assertRaises(Exception) as context: tempest_resources.create() msg = 'Failed to create private network' @@ -48,7 +49,8 @@ class OSTempestConfUtilsTesting(unittest.TestCase): @mock.patch('snaps.openstack.utils.deploy_utils.create_image', return_value=None) def test_create_tempest_resources_missing_image(self, *mock_args): - tempest_resources = tempest.TempestResourcesManager(os_creds={}) + tempest_resources = tempest.TempestResourcesManager( + os_creds=self.os_creds) with self.assertRaises(Exception) as context: tempest_resources.create() diff --git a/functest/tests/unit/openstack/tempest/test_tempest.py b/functest/tests/unit/openstack/tempest/test_tempest.py index d1e2f14b..292eb75b 100644 --- a/functest/tests/unit/openstack/tempest/test_tempest.py +++ b/functest/tests/unit/openstack/tempest/test_tempest.py @@ -39,7 +39,8 @@ class OSTempestTesting(unittest.TestCase): mock.patch('functest.opnfv_tests.openstack.tempest.tempest.' 'conf_utils.get_verifier_deployment_dir', return_value='test_verifier_deploy_dir'), \ - mock.patch('snaps.openstack.tests.openstack_tests.get_credentials', + mock.patch('functest.opnfv_tests.openstack.snaps.snaps_utils.' + 'get_credentials', return_value=os_creds): self.tempestcommon = tempest.TempestCommon() self.tempestsmoke_serial = tempest.TempestSmokeSerial() |