Make some OSC tests more clean
- Rename one test to reflect its meaning. - Remove unnecessary mocking Change-Id: I46576105b36aa9e4614ccf81d51efcdc640d2c63
This commit is contained in:
parent
d02e6f0b63
commit
af1aa7a9f7
@ -440,7 +440,7 @@ class TestEnvironmentAppsEdit(TestEnvironment):
|
|||||||
# Command to test
|
# Command to test
|
||||||
self.cmd = osc_env.EnvironmentAppsEdit(self.app, None)
|
self.cmd = osc_env.EnvironmentAppsEdit(self.app, None)
|
||||||
|
|
||||||
def test_environment_deploy(self):
|
def test_environment_apps_edit(self):
|
||||||
fake = collections.namedtuple('fakeEnv', 'services')
|
fake = collections.namedtuple('fakeEnv', 'services')
|
||||||
self.environment_mock.get.side_effect = [
|
self.environment_mock.get.side_effect = [
|
||||||
fake(services=[
|
fake(services=[
|
||||||
|
@ -10,8 +10,6 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
|
||||||
|
|
||||||
from muranoclient.osc.v1 import schema as osc_schema
|
from muranoclient.osc.v1 import schema as osc_schema
|
||||||
from muranoclient.tests.unit.osc.v1 import fakes
|
from muranoclient.tests.unit.osc.v1 import fakes
|
||||||
from muranoclient.v1 import schemas as api_schemas
|
from muranoclient.v1 import schemas as api_schemas
|
||||||
@ -39,10 +37,7 @@ class TestSchema(fakes.TestApplicationCatalog):
|
|||||||
None, SAMPLE_CLASS_SCHEMA)
|
None, SAMPLE_CLASS_SCHEMA)
|
||||||
self.cmd = osc_schema.ShowSchema(self.app, None)
|
self.cmd = osc_schema.ShowSchema(self.app, None)
|
||||||
|
|
||||||
@mock.patch('osc_lib.utils.get_item_properties')
|
def test_query_class_schema(self):
|
||||||
def test_query_class_schema(self, mock_util):
|
|
||||||
mock_util.return_value = 'result'
|
|
||||||
|
|
||||||
arglist = ['class.name', 'methodName1',
|
arglist = ['class.name', 'methodName1',
|
||||||
'--package-name', 'package.name',
|
'--package-name', 'package.name',
|
||||||
'--class-version', '>1']
|
'--class-version', '>1']
|
||||||
|
Loading…
Reference in New Issue
Block a user