Make some OSC tests more clean

- Rename one test to reflect its meaning.
- Remove unnecessary mocking

Change-Id: I46576105b36aa9e4614ccf81d51efcdc640d2c63
This commit is contained in:
Valerii Kovalchuk 2016-10-03 15:35:55 +03:00
parent d02e6f0b63
commit af1aa7a9f7
2 changed files with 2 additions and 7 deletions

View File

@ -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=[

View File

@ -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']