# Path: muranoclient/osc/v1/environment.py
# LOG = logging.getLogger(__name__)
# class ListEnvironments(command.Lister):
# class ShowEnvironment(command.ShowOne):
# class RenameEnvironment(command.Lister):
# class EnvironmentSessionCreate(command.ShowOne):
# class EnvironmentCreate(command.Lister):
# class EnvironmentDelete(command.Lister):
# class EnvironmentDeploy(command.ShowOne):
# class EnvironmentAppsEdit(command.Command):
# class EnvironmentModelShow(command.ShowOne):
# class EnvironmentModelEdit(command.ShowOne):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
# 
# Path: muranoclient/tests/unit/osc/v1/fakes.py
# class TestApplicationCatalog(utils.TestCommand):
#     def setUp(self):
# 
# Path: muranoclient/v1/environments.py
# class Environment(base.Resource):
# class Status(base.Resource):
# class EnvironmentManager(base.ManagerWithFind):
#     def __repr__(self):
#     def data(self, **kwargs):
#     def __repr__(self):
#     def data(self, **kwargs):
#     def list(self, all_tenants=False, tenant_id=None):
#     def create(self, data):
#     def update(self, environment_id, name):
#     def delete(self, environment_id, abandon=False):
#     def get(self, environment_id, session_id=None):
#     def last_status(self, environment_id, session_id):
#     def get_model(self, environment_id, path, session_id=None):
#     def update_model(self, environment_id, data, session_id):


import collections
import json
import tempfile
from unittest import mock
from muranoclient.osc.v1 import environment as osc_env
from muranoclient.tests.unit.osc.v1 import fakes
from muranoclient.v1 import environments as api_env
        self.cmd = osc_env.RenameEnvironment(self.app, None)

    @mock.patch('osc_lib.utils.get_item_properties')
    def test_environment_rename(self, mock_util):
        arglist = ['1234', 'fake-1']
        verifylist = [('id', '1234'), ('name', 'fake-1')]

        mock_util.return_value = ('1234', 'fake-1', 'fake deployed',
                                  '2015-12-16T17:31:54', '2015-12-16T17:31:54'
                                  )

        parsed_args = self.check_parser(self.cmd, arglist, verifylist)

        columns, data = self.cmd.take_action(parsed_args)

        # Check that columns are correct
        expected_columns = ['Id', 'Name', 'Status', 'Created', 'Updated']
        self.assertEqual(expected_columns, columns)

        # Check that data is correct
        expected_data = [('1234', 'fake-1', 'fake deployed',
                          '2015-12-16T17:31:54', '2015-12-16T17:31:54')]
        self.assertEqual(expected_data, data)


class TestEnvironmentSessionCreate(TestEnvironment):
    def setUp(self):
        super(TestEnvironmentSessionCreate, self).setUp()

        # Command to test

# Path: muranoclient/osc/v1/environment.py
# LOG = logging.getLogger(__name__)
# class ListEnvironments(command.Lister):
# class ShowEnvironment(command.ShowOne):
# class RenameEnvironment(command.Lister):
# class EnvironmentSessionCreate(command.ShowOne):
# class EnvironmentCreate(command.Lister):
# class EnvironmentDelete(command.Lister):
# class EnvironmentDeploy(command.ShowOne):
# class EnvironmentAppsEdit(command.Command):
# class EnvironmentModelShow(command.ShowOne):
# class EnvironmentModelEdit(command.ShowOne):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
# 
# Path: muranoclient/tests/unit/osc/v1/fakes.py
# class TestApplicationCatalog(utils.TestCommand):
#     def setUp(self):
# 
# Path: muranoclient/v1/environments.py
# class Environment(base.Resource):
# class Status(base.Resource):
# class EnvironmentManager(base.ManagerWithFind):
#     def __repr__(self):
#     def data(self, **kwargs):
#     def __repr__(self):
#     def data(self, **kwargs):
#     def list(self, all_tenants=False, tenant_id=None):
#     def create(self, data):
#     def update(self, environment_id, name):
#     def delete(self, environment_id, abandon=False):
#     def get(self, environment_id, session_id=None):
#     def last_status(self, environment_id, session_id):
#     def get_model(self, environment_id, path, session_id=None):
#     def update_model(self, environment_id, data, session_id):


# Path: muranoclient/tests/unit/osc/v1/test_environment.py
import collections
import json
import tempfile
from unittest import mock
from muranoclient.osc.v1 import environment as osc_env
from muranoclient.tests.unit.osc.v1 import fakes
from muranoclient.v1 import environments as api_env

        self.cmd = osc_env.RenameEnvironment(self.app, None)

    @mock.patch('osc_lib.utils.get_item_properties')
    def test_environment_rename(self, mock_util):
        arglist = ['1234', 'fake-1']
        verifylist = [('id', '1234'), ('name', 'fake-1')]

        mock_util.return_value = ('1234', 'fake-1', 'fake deployed',
                                  '2015-12-16T17:31:54', '2015-12-16T17:31:54'
                                  )

        parsed_args = self.check_parser(self.cmd, arglist, verifylist)

        columns, data = self.cmd.take_action(parsed_args)

        # Check that columns are correct
        expected_columns = ['Id', 'Name', 'Status', 'Created', 'Updated']
        self.assertEqual(expected_columns, columns)

        # Check that data is correct
        expected_data = [('1234', 'fake-1', 'fake deployed',
                          '2015-12-16T17:31:54', '2015-12-16T17:31:54')]
        self.assertEqual(expected_data, data)


class TestEnvironmentSessionCreate(TestEnvironment):
    def setUp(self):
        super(TestEnvironmentSessionCreate, self).setUp()

        # Command to test

        self.cmd = osc_env.EnvironmentSessionCreate(self.app, None)