# Path: mistralclient/api/v2/workbooks.py
# class Workbook(base.Resource):
# class WorkbookManager(base.ResourceManager):
#     def _get_workbooks_url(self, resource=None, namespace=None, scope=None):
#     def create(self, definition, namespace='', scope='private'):
#     def update(self, definition, namespace='', scope='private'):
#     def list(self, namespace='', marker='', limit=None, sort_keys='',
#              sort_dirs='', fields='', **filters):
#     def get(self, name, namespace=''):
#     def delete(self, name, namespace=''):
#     def validate(self, definition):
# 
# Path: mistralclient/commands/v2/workbooks.py
# class WorkbookFormatter(base.MistralFormatter):
# class List(base.MistralLister):
# class Get(command.ShowOne):
# class Create(command.ShowOne):
# class Delete(command.Command):
# class Update(command.ShowOne):
# class GetDefinition(command.Command):
# class Validate(command.ShowOne):
#     COLUMNS = [
#         ('name', 'Name'),
#         ('namespace', 'Namespace'),
#         ('tags', 'Tags'),
#         ('scope', 'Scope'),
#         ('created_at', 'Created at'),
#         ('updated_at', 'Updated at')
#     ]
#     def format(workbook=None, lister=False):
#     def _get_format_function(self):
#     def _get_resources(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 _format(result=None):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
# 
# Path: mistralclient/tests/unit/base.py
# class BaseClientTest(base.BaseTestCase):
# class BaseCommandTest(base.BaseTestCase):
#     def setUp(self):
#     def setUp(self):
#     def call(self, command, app_args=(), prog_name=''):


from unittest import mock
from mistralclient.api.v2 import workbooks
from mistralclient.commands.v2 import workbooks as workbook_cmd
from mistralclient.tests.unit import base

WORKBOOK_DICT = {
    'name': 'a',
    'namespace': '',
    'tags': ['a', 'b'],
    'scope': 'private',
    'created_at': '1',
    'updated_at': '1',
}


WB_DEF = """
---
version: '2.0

name: wb

workflows:
  wf1:
    tasks:
      task1:
        action: nova.servers_get server="1"
"""

WB_WITH_DEF_DICT = WORKBOOK_DICT.copy()
WB_WITH_DEF_DICT.update({'definition': WB_DEF})
WORKBOOK = workbooks.Workbook(mock, WORKBOOK_DICT)
WORKBOOK_WITH_DEF = workbooks.Workbook(mock, WB_WITH_DEF_DICT)



# Path: mistralclient/api/v2/workbooks.py
# class Workbook(base.Resource):
# class WorkbookManager(base.ResourceManager):
#     def _get_workbooks_url(self, resource=None, namespace=None, scope=None):
#     def create(self, definition, namespace='', scope='private'):
#     def update(self, definition, namespace='', scope='private'):
#     def list(self, namespace='', marker='', limit=None, sort_keys='',
#              sort_dirs='', fields='', **filters):
#     def get(self, name, namespace=''):
#     def delete(self, name, namespace=''):
#     def validate(self, definition):
# 
# Path: mistralclient/commands/v2/workbooks.py
# class WorkbookFormatter(base.MistralFormatter):
# class List(base.MistralLister):
# class Get(command.ShowOne):
# class Create(command.ShowOne):
# class Delete(command.Command):
# class Update(command.ShowOne):
# class GetDefinition(command.Command):
# class Validate(command.ShowOne):
#     COLUMNS = [
#         ('name', 'Name'),
#         ('namespace', 'Namespace'),
#         ('tags', 'Tags'),
#         ('scope', 'Scope'),
#         ('created_at', 'Created at'),
#         ('updated_at', 'Updated at')
#     ]
#     def format(workbook=None, lister=False):
#     def _get_format_function(self):
#     def _get_resources(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 _format(result=None):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
# 
# Path: mistralclient/tests/unit/base.py
# class BaseClientTest(base.BaseTestCase):
# class BaseCommandTest(base.BaseTestCase):
#     def setUp(self):
#     def setUp(self):
#     def call(self, command, app_args=(), prog_name=''):


# Path: mistralclient/tests/unit/v2/test_cli_workbooks.py
from unittest import mock
from mistralclient.api.v2 import workbooks
from mistralclient.commands.v2 import workbooks as workbook_cmd
from mistralclient.tests.unit import base


WORKBOOK_DICT = {
    'name': 'a',
    'namespace': '',
    'tags': ['a', 'b'],
    'scope': 'private',
    'created_at': '1',
    'updated_at': '1',
}


WB_DEF = """
---
version: '2.0

name: wb

workflows:
  wf1:
    tasks:
      task1:
        action: nova.servers_get server="1"
"""

WB_WITH_DEF_DICT = WORKBOOK_DICT.copy()
WB_WITH_DEF_DICT.update({'definition': WB_DEF})
WORKBOOK = workbooks.Workbook(mock, WORKBOOK_DICT)
WORKBOOK_WITH_DEF = workbooks.Workbook(mock, WB_WITH_DEF_DICT)



class TestCLIWorkbooksV2(base.BaseCommandTest):