# Path: mistralclient/api/v2/code_sources.py
# class CodeSource(base.Resource):
# class CodeSourceManager(base.ResourceManager):
#     def create(self, name, content, namespace='', scope='private'):
#     def update(self, identifier, content, namespace='', scope='private'):
#     def list(self, namespace='', marker='', limit=None, sort_keys='',
#              sort_dirs='', fields='', **filters):
#     def get(self, identifier, namespace=''):
#     def delete(self, identifier, namespace=None):
# 
# Path: mistralclient/commands/v2/code_sources.py
# class CodeSourceFormatter(base.MistralFormatter):
# class List(base.MistralLister):
# class Get(show.ShowOne):
# class Create(command.ShowOne):
# class Delete(command.Command):
# class Update(command.ShowOne):
# class GetContent(command.Command):
#     COLUMNS = [
#         ('id', 'ID'),
#         ('name', 'Name'),
#         ('namespace', 'Namespace'),
#         ('project_id', 'Project ID'),
#         ('scope', 'Scope'),
#         ('created_at', 'Created at'),
#         ('updated_at', 'Updated at')
#     ]
#     def format(code_src=None, lister=False):
#     def _get_format_function(self):
#     def get_parser(self, prog_name):
#     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):
# 
# 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 code_sources
from mistralclient.commands.v2 import code_sources as code_src_cmd
from mistralclient.tests.unit import base





CODE_SRC_CONTENT = """
from mistral_lib import actions

class HelloAction(actions.Action):
    def __init__(self, f_name, l_name):
        super(HelloAction, self).__init__()

        self._f_name = f_name
        self._l_name = l_name

    def run(self, context):
        return 'Hello %s %s!' % (self._f_name, self._l_name)
"""

CODE_SRC_DICT = {
    'id': '1-2-3-4',
    'name': 'hello_module',
    'namespace': '',
    'project_id': '12345',
    'scope': 'private',
    'content': CODE_SRC_CONTENT,
    'created_at': '1',
    'updated_at': '1'
}


# Path: mistralclient/api/v2/code_sources.py
# class CodeSource(base.Resource):
# class CodeSourceManager(base.ResourceManager):
#     def create(self, name, content, namespace='', scope='private'):
#     def update(self, identifier, content, namespace='', scope='private'):
#     def list(self, namespace='', marker='', limit=None, sort_keys='',
#              sort_dirs='', fields='', **filters):
#     def get(self, identifier, namespace=''):
#     def delete(self, identifier, namespace=None):
# 
# Path: mistralclient/commands/v2/code_sources.py
# class CodeSourceFormatter(base.MistralFormatter):
# class List(base.MistralLister):
# class Get(show.ShowOne):
# class Create(command.ShowOne):
# class Delete(command.Command):
# class Update(command.ShowOne):
# class GetContent(command.Command):
#     COLUMNS = [
#         ('id', 'ID'),
#         ('name', 'Name'),
#         ('namespace', 'Namespace'),
#         ('project_id', 'Project ID'),
#         ('scope', 'Scope'),
#         ('created_at', 'Created at'),
#         ('updated_at', 'Updated at')
#     ]
#     def format(code_src=None, lister=False):
#     def _get_format_function(self):
#     def get_parser(self, prog_name):
#     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):
# 
# 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_code_sources.py
from unittest import mock
from mistralclient.api.v2 import code_sources
from mistralclient.commands.v2 import code_sources as code_src_cmd
from mistralclient.tests.unit import base






CODE_SRC_CONTENT = """
from mistral_lib import actions

class HelloAction(actions.Action):
    def __init__(self, f_name, l_name):
        super(HelloAction, self).__init__()

        self._f_name = f_name
        self._l_name = l_name

    def run(self, context):
        return 'Hello %s %s!' % (self._f_name, self._l_name)
"""

CODE_SRC_DICT = {
    'id': '1-2-3-4',
    'name': 'hello_module',
    'namespace': '',
    'project_id': '12345',
    'scope': 'private',
    'content': CODE_SRC_CONTENT,
    'created_at': '1',
    'updated_at': '1'
}


CODE_SRC = code_sources.CodeSource(mock, CODE_SRC_DICT)