# Path: magnumclient/tests/v1/shell_test_base.py
# FAKE_ENV = {'OS_USERNAME': 'username',
#             'OS_PASSWORD': 'password',
#             'OS_PROJECT_NAME': 'project_name',
#             'OS_AUTH_URL': 'http://no.where/v2.0',
#             'BYPASS_URL': 'http://magnum'}
# class TestCommandLineArgument(utils.TestCase):
#     def setUp(self):
#     def _test_arg_success(self, command, keyword=None):
#     def _test_arg_failure(self, command, error_msg):


from unittest import mock
from magnumclient.tests.v1 import shell_test_base
        expected_args['marker'] = marker
        expected_args['limit'] = limit
        expected_args['sort_dir'] = sort_dir
        expected_args['sort_key'] = sort_key
        expected_args['all_tenants'] = False
        return expected_args

    def _get_expected_args_create(self, project_id, resource, hard_limit):
        expected_args = {}
        expected_args['project_id'] = project_id
        expected_args['resource'] = resource
        expected_args['hard_limit'] = hard_limit
        return expected_args

    @mock.patch('magnumclient.v1.quotas.QuotasManager.list')
    def test_quotas_list_success(self, mock_list):
        self._test_arg_success('quotas-list')
        expected_args = self._get_expected_args_list()
        mock_list.assert_called_once_with(**expected_args)

    @mock.patch('magnumclient.v1.quotas.QuotasManager.list')
    def test_quotas_list_failure(self, mock_list):
        self._test_arg_failure('quotas-list --wrong',
                               self._unrecognized_arg_error)
        mock_list.assert_not_called()

    @mock.patch('magnumclient.v1.quotas.QuotasManager.create')
    def test_quotas_create_success(self, mock_create):
        self._test_arg_success('quotas-create --project-id abc '
                               '--resource Cluster '

# Path: magnumclient/tests/v1/shell_test_base.py
# FAKE_ENV = {'OS_USERNAME': 'username',
#             'OS_PASSWORD': 'password',
#             'OS_PROJECT_NAME': 'project_name',
#             'OS_AUTH_URL': 'http://no.where/v2.0',
#             'BYPASS_URL': 'http://magnum'}
# class TestCommandLineArgument(utils.TestCase):
#     def setUp(self):
#     def _test_arg_success(self, command, keyword=None):
#     def _test_arg_failure(self, command, error_msg):


# Path: magnumclient/tests/v1/test_quotas_shell.py
from unittest import mock
from magnumclient.tests.v1 import shell_test_base

        expected_args['marker'] = marker
        expected_args['limit'] = limit
        expected_args['sort_dir'] = sort_dir
        expected_args['sort_key'] = sort_key
        expected_args['all_tenants'] = False
        return expected_args

    def _get_expected_args_create(self, project_id, resource, hard_limit):
        expected_args = {}
        expected_args['project_id'] = project_id
        expected_args['resource'] = resource
        expected_args['hard_limit'] = hard_limit
        return expected_args

    @mock.patch('magnumclient.v1.quotas.QuotasManager.list')
    def test_quotas_list_success(self, mock_list):
        self._test_arg_success('quotas-list')
        expected_args = self._get_expected_args_list()
        mock_list.assert_called_once_with(**expected_args)

    @mock.patch('magnumclient.v1.quotas.QuotasManager.list')
    def test_quotas_list_failure(self, mock_list):
        self._test_arg_failure('quotas-list --wrong',
                               self._unrecognized_arg_error)
        mock_list.assert_not_called()

    @mock.patch('magnumclient.v1.quotas.QuotasManager.create')
    def test_quotas_create_success(self, mock_create):
        self._test_arg_success('quotas-create --project-id abc '
                               '--resource Cluster '

                               '--hard-limit 15')