diff options
author | Jose Lausuch <jose.lausuch@ericsson.com> | 2017-06-26 10:06:41 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-06-26 10:06:41 +0000 |
commit | 4252d177e9ccb0e533b74751008d7f8d5ab57840 (patch) | |
tree | ef83382cc610dffb89bd8708b015983ca2c6b0c2 /functest/tests | |
parent | c8d5216c01c42f0e090f9b441985f8ebc3eca0ed (diff) | |
parent | 5cfd8ce686f8b539d01a3e7e009e7d5a18b8228f (diff) |
Merge "Use glance to list images"
Diffstat (limited to 'functest/tests')
-rw-r--r-- | functest/tests/unit/utils/test_openstack_clean.py | 3 | ||||
-rw-r--r-- | functest/tests/unit/utils/test_openstack_snapshot.py | 3 | ||||
-rw-r--r-- | functest/tests/unit/utils/test_openstack_utils.py | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/functest/tests/unit/utils/test_openstack_clean.py b/functest/tests/unit/utils/test_openstack_clean.py index fe7b50d4..5feed167 100644 --- a/functest/tests/unit/utils/test_openstack_clean.py +++ b/functest/tests/unit/utils/test_openstack_clean.py @@ -672,6 +672,7 @@ class OSCleanTesting(unittest.TestCase): RegexMatch(" Removing " "\s*\S+...")) + @mock.patch('functest.utils.openstack_clean.os_utils.get_glance_client') @mock.patch('functest.utils.openstack_clean.os_utils.get_cinder_client') @mock.patch('functest.utils.openstack_clean.os_utils' '.get_keystone_client') @@ -684,7 +685,7 @@ class OSCleanTesting(unittest.TestCase): @mock.patch('functest.utils.openstack_clean.logger.debug') def test_main_default(self, mock_logger_debug, mock_logger_info, mock_creds, mock_nova, mock_neutron, - mock_keystone, mock_cinder): + mock_keystone, mock_cinder, mock_glance): with mock.patch('functest.utils.openstack_clean.remove_instances') \ as mock_remove_instances, \ diff --git a/functest/tests/unit/utils/test_openstack_snapshot.py b/functest/tests/unit/utils/test_openstack_snapshot.py index f359575d..33e74609 100644 --- a/functest/tests/unit/utils/test_openstack_snapshot.py +++ b/functest/tests/unit/utils/test_openstack_snapshot.py @@ -189,6 +189,7 @@ class OSSnapshotTesting(unittest.TestCase): mock_logger_debug.assert_called_once_with("Getting tenants...") self.assertDictEqual(resp, {'tenants': {}}) + @mock.patch('functest.utils.openstack_clean.os_utils.get_glance_client') @mock.patch('functest.utils.openstack_snapshot.os_utils.get_cinder_client') @mock.patch('functest.utils.openstack_snapshot.os_utils' '.get_keystone_client') @@ -200,7 +201,7 @@ class OSSnapshotTesting(unittest.TestCase): @mock.patch('functest.utils.openstack_snapshot.logger.debug') def test_main_default(self, mock_logger_debug, mock_logger_info, mock_creds, mock_nova, mock_neutron, - mock_keystone, mock_cinder): + mock_keystone, mock_cinder, mock_glance): with mock.patch('functest.utils.openstack_snapshot.get_instances', return_value=self.update_list), \ mock.patch('functest.utils.openstack_snapshot.get_images', diff --git a/functest/tests/unit/utils/test_openstack_utils.py b/functest/tests/unit/utils/test_openstack_utils.py index 54deb27e..fa0e0f5e 100644 --- a/functest/tests/unit/utils/test_openstack_utils.py +++ b/functest/tests/unit/utils/test_openstack_utils.py @@ -1472,7 +1472,7 @@ class OSUtilsTesting(unittest.TestCase): def test_get_images_default(self): self.assertEqual(openstack_utils. - get_images(self.nova_client), + get_images(self.glance_client), [self.image]) @mock.patch('functest.utils.openstack_utils.logger.error') |