From dd25a3c41603ce254bb1ba1e81e6f43b33cf6eb8 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Mon, 10 Oct 2016 10:03:10 -0400 Subject: [PATCH] Remove a few glance client mocks we missed Change-Id: Id4b5bc89e8829b3aebe67053b16c49abc60248c6 --- shade/tests/unit/test_caching.py | 6 ++---- shade/tests/unit/test_shade_operator.py | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/shade/tests/unit/test_caching.py b/shade/tests/unit/test_caching.py index c6c6c1dd5..dfe43db71 100644 --- a/shade/tests/unit/test_caching.py +++ b/shade/tests/unit/test_caching.py @@ -599,9 +599,8 @@ class TestMemoryCache(base.TestCase): @mock.patch.object(occ.cloud_config.CloudConfig, 'get_api_version') @mock.patch.object(shade.OpenStackCloud, '_image_client') - @mock.patch.object(shade.OpenStackCloud, 'glance_client') def test_create_image_put_meta_int( - self, glance_mock, mock_image_client, mock_api_version): + self, mock_image_client, mock_api_version): mock_api_version.return_value = '2' self.cloud.image_api_use_tasks = False @@ -663,9 +662,8 @@ class TestMemoryCache(base.TestCase): @mock.patch.object(occ.cloud_config.CloudConfig, 'get_api_version') @mock.patch.object(shade.OpenStackCloud, '_image_client') - @mock.patch.object(shade.OpenStackCloud, 'glance_client') def test_create_image_put_user_prop( - self, glance_mock, mock_image_client, mock_api_version): + self, mock_image_client, mock_api_version): mock_api_version.return_value = '2' self.cloud.image_api_use_tasks = False diff --git a/shade/tests/unit/test_shade_operator.py b/shade/tests/unit/test_shade_operator.py index 28010cf1f..abae45f8e 100644 --- a/shade/tests/unit/test_shade_operator.py +++ b/shade/tests/unit/test_shade_operator.py @@ -1021,24 +1021,24 @@ class TestShadeOperator(base.TestCase): ) @mock.patch.object(shade.OpenStackCloud, '_image_client') - def test_get_image_name(self, glance_mock): + def test_get_image_name(self, mock_client): fake_image = munch.Munch( id='22', name='22 name', status='success') - glance_mock.get.return_value = [fake_image] + mock_client.get.return_value = [fake_image] self.assertEqual('22 name', self.op_cloud.get_image_name('22')) self.assertEqual('22 name', self.op_cloud.get_image_name('22 name')) @mock.patch.object(shade.OpenStackCloud, '_image_client') - def test_get_image_id(self, glance_mock): + def test_get_image_id(self, mock_client): fake_image = munch.Munch( id='22', name='22 name', status='success') - glance_mock.get.return_value = [fake_image] + mock_client.get.return_value = [fake_image] self.assertEqual('22', self.op_cloud.get_image_id('22')) self.assertEqual('22', self.op_cloud.get_image_id('22 name'))