From af1aa7a9f7cd78dbe3a060a99b1fc33f5008c9cd Mon Sep 17 00:00:00 2001 From: Valerii Kovalchuk Date: Mon, 3 Oct 2016 15:35:55 +0300 Subject: [PATCH] Make some OSC tests more clean - Rename one test to reflect its meaning. - Remove unnecessary mocking Change-Id: I46576105b36aa9e4614ccf81d51efcdc640d2c63 --- muranoclient/tests/unit/osc/v1/test_environment.py | 2 +- muranoclient/tests/unit/osc/v1/test_schema.py | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/muranoclient/tests/unit/osc/v1/test_environment.py b/muranoclient/tests/unit/osc/v1/test_environment.py index dbf5ff84..16f2e508 100644 --- a/muranoclient/tests/unit/osc/v1/test_environment.py +++ b/muranoclient/tests/unit/osc/v1/test_environment.py @@ -440,7 +440,7 @@ class TestEnvironmentAppsEdit(TestEnvironment): # Command to test self.cmd = osc_env.EnvironmentAppsEdit(self.app, None) - def test_environment_deploy(self): + def test_environment_apps_edit(self): fake = collections.namedtuple('fakeEnv', 'services') self.environment_mock.get.side_effect = [ fake(services=[ diff --git a/muranoclient/tests/unit/osc/v1/test_schema.py b/muranoclient/tests/unit/osc/v1/test_schema.py index 657ecb3c..58253e34 100644 --- a/muranoclient/tests/unit/osc/v1/test_schema.py +++ b/muranoclient/tests/unit/osc/v1/test_schema.py @@ -10,8 +10,6 @@ # License for the specific language governing permissions and limitations # under the License. -import mock - from muranoclient.osc.v1 import schema as osc_schema from muranoclient.tests.unit.osc.v1 import fakes from muranoclient.v1 import schemas as api_schemas @@ -39,10 +37,7 @@ class TestSchema(fakes.TestApplicationCatalog): None, SAMPLE_CLASS_SCHEMA) self.cmd = osc_schema.ShowSchema(self.app, None) - @mock.patch('osc_lib.utils.get_item_properties') - def test_query_class_schema(self, mock_util): - mock_util.return_value = 'result' - + def test_query_class_schema(self): arglist = ['class.name', 'methodName1', '--package-name', 'package.name', '--class-version', '>1']