# Path: muranoclient/osc/v1/category.py
# LOG = logging.getLogger(__name__)
# class ListCategories(command.Lister):
# class ShowCategory(command.ShowOne):
# class CreateCategory(command.Lister):
# class DeleteCategory(command.Lister):
#     def take_action(self, parsed_args=None):
#     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/categories.py
# class Category(base.Resource):
# class CategoryManager(base.Manager):
#     def __repr__(self):
#     def data(self, **kwargs):
#     def list(self, **kwargs):
#     def get(self, id):
#     def add(self, data):
#     def delete(self, id):
# 
# Path: muranoclient/v1/packages.py
# DEFAULT_PAGE_SIZE = 20
# class Package(base.Resource):
# class PackageManager(base.Manager):
#     def __repr__(self):
#     def data(self, **kwargs):
#     def create(self, data, files):
#     def get(self, app_id):
#     def filter(self, **kwargs):
#         def construct_url(params):
#         def paginate(_url):
#     def list(self, include_disabled=False, limit=20):
#     def delete(self, app_id):
#     def update(self, app_id, body, operation='replace'):
#     def download(self, app_id):
#     def toggle_active(self, app_id):
#     def toggle_public(self, app_id):
#     def get_ui(self, app_id, loader_cls=None):
#     def get_logo(self, app_id):
#     def get_supplier_logo(self, app_id):


from unittest import mock
from muranoclient.osc.v1 import category as osc_category
from muranoclient.tests.unit.osc.v1 import fakes
from muranoclient.v1 import categories as api_category
from muranoclient.v1 import packages as api_packages
        self.cmd = osc_category.CreateCategory(self.app, None)

    @mock.patch('osc_lib.utils.get_item_properties')
    def test_category_list(self, mock_util):
        arglist = ['fake1']
        verifylist = [('name', 'fake1')]

        mock_util.return_value = ('xyz123', 'fake1')

        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']
        self.assertEqual(expected_columns, columns)

        # Check that data is correct
        expected_data = [('xyz123', 'fake1')]
        self.assertEqual(expected_data, data)


class TestDeleteCategory(TestCategory):
    def setUp(self):
        super(TestDeleteCategory, self).setUp()
        self.category_mock.delete.return_value = None
        self.category_mock.list.return_value = [api_category.Category(None,
                                                CATEGORY_INFO)]

        # Command to test

# Path: muranoclient/osc/v1/category.py
# LOG = logging.getLogger(__name__)
# class ListCategories(command.Lister):
# class ShowCategory(command.ShowOne):
# class CreateCategory(command.Lister):
# class DeleteCategory(command.Lister):
#     def take_action(self, parsed_args=None):
#     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/categories.py
# class Category(base.Resource):
# class CategoryManager(base.Manager):
#     def __repr__(self):
#     def data(self, **kwargs):
#     def list(self, **kwargs):
#     def get(self, id):
#     def add(self, data):
#     def delete(self, id):
# 
# Path: muranoclient/v1/packages.py
# DEFAULT_PAGE_SIZE = 20
# class Package(base.Resource):
# class PackageManager(base.Manager):
#     def __repr__(self):
#     def data(self, **kwargs):
#     def create(self, data, files):
#     def get(self, app_id):
#     def filter(self, **kwargs):
#         def construct_url(params):
#         def paginate(_url):
#     def list(self, include_disabled=False, limit=20):
#     def delete(self, app_id):
#     def update(self, app_id, body, operation='replace'):
#     def download(self, app_id):
#     def toggle_active(self, app_id):
#     def toggle_public(self, app_id):
#     def get_ui(self, app_id, loader_cls=None):
#     def get_logo(self, app_id):
#     def get_supplier_logo(self, app_id):


# Path: muranoclient/tests/unit/osc/v1/test_category.py
from unittest import mock
from muranoclient.osc.v1 import category as osc_category
from muranoclient.tests.unit.osc.v1 import fakes
from muranoclient.v1 import categories as api_category
from muranoclient.v1 import packages as api_packages

        self.cmd = osc_category.CreateCategory(self.app, None)

    @mock.patch('osc_lib.utils.get_item_properties')
    def test_category_list(self, mock_util):
        arglist = ['fake1']
        verifylist = [('name', 'fake1')]

        mock_util.return_value = ('xyz123', 'fake1')

        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']
        self.assertEqual(expected_columns, columns)

        # Check that data is correct
        expected_data = [('xyz123', 'fake1')]
        self.assertEqual(expected_data, data)


class TestDeleteCategory(TestCategory):
    def setUp(self):
        super(TestDeleteCategory, self).setUp()
        self.category_mock.delete.return_value = None
        self.category_mock.list.return_value = [api_category.Category(None,
                                                CATEGORY_INFO)]

        # Command to test

        self.cmd = osc_category.DeleteCategory(self.app, None)