# Path: awsshell/app.py
# LOG = logging.getLogger(__name__)
# EXIT_REQUESTED = object()
#     USAGE = (
#         '.profile           # Print the current profile\n'
#         '.profile <name>    # Change the current profile\n'
#     )
#     HANDLER_CLASSES = {
#         'edit': EditHandler,
#         'profile': ProfileHandler,
#         'cd': ChangeDirHandler,
#         'exit': ExitHandler,
#         'quit': ExitHandler,
#     }
# def create_aws_shell(completer, model_completer, docs):
#     def __init__(self, output=sys.stdout, err=sys.stderr, chdir=os.chdir):
#     def run(self, command, application):
#     def __init__(self, popen_cls=None, env=None, err=sys.stderr):
#     def _get_editor_command(self):
#     def _generate_edit_history(self, application):
#     def run(self, command, application):
#     def __init__(self, output=sys.stdout, err=sys.stderr):
#     def run(self, command, application):
#     def run(self, command, application):
#     def __init__(self, output=sys.stdout, err=sys.stderr):
#     def handle_cmd(self, command, application):
#     def _unknown_cmd(self, cmd_parts, application):
#     def __init__(self, completer, model_completer, docs,
#                  input=None, output=None, popen_cls=None):
#     def load_config(self):
#     def save_config(self):
#     def cli(self):
#     def run(self):
#     def stop_input_and_refresh_cli(self):
#     def create_layout(self, display_completions_in_columns, toolbar):
#     def create_buffer(self, completer, history):
#     def create_key_manager(self):
#         def set_match_fuzzy(match_fuzzy):
#         def set_enable_vi_bindings(enable_vi_bindings):
#         def set_show_completion_columns(show_completion_columns):
#         def set_show_help(show_help):
#     def create_application(self, completer, history,
#                            display_completions_in_columns):
#     def on_input_timeout(self, cli):
#     def create_cli_interface(self, display_completions_in_columns):
#     def profile(self):
#     def profile(self, new_profile_name):
# class InputInterrupt(Exception):
# class ChangeDirHandler(object):
# class EditHandler(object):
# class ProfileHandler(object):
# class ExitHandler(object):
# class DotCommandHandler(object):
# class AWSShell(object):
# 
# Path: awsshell/shellcomplete.py
# LOG = logging.getLogger(__name__)
# class AWSShellCompleter(Completer):
#     def __init__(self, completer, server_side_completer=None):
#     def _create_server_side_completer(self, session=None):
#     def change_profile(self, profile_name):
#     def completer(self):
#     def completer(self, value):
#     def last_option(self):
#     def current_command(self):
#     def _convert_to_prompt_completions(self, low_level_completions,
#                                        text_before_cursor):
#     def get_completions(self, document, complete_event):
# 
# Path: awsshell/compat.py
# PY3 = sys.version_info[0] == 3
# ON_WINDOWS = platform.system() == 'Windows'
#     def default_editor():
#     def default_editor():


import pytest
import mock
from awsshell import app
from awsshell import shellcomplete
from awsshell import compat




@pytest.fixture
def errstream():
    return compat.StringIO()


def test_can_dispatch_dot_commands():
    call_args = []
    class CustomHandler(object):
        def run(self, command, context):
            call_args.append((command, context))

# Path: awsshell/app.py
# LOG = logging.getLogger(__name__)
# EXIT_REQUESTED = object()
#     USAGE = (
#         '.profile           # Print the current profile\n'
#         '.profile <name>    # Change the current profile\n'
#     )
#     HANDLER_CLASSES = {
#         'edit': EditHandler,
#         'profile': ProfileHandler,
#         'cd': ChangeDirHandler,
#         'exit': ExitHandler,
#         'quit': ExitHandler,
#     }
# def create_aws_shell(completer, model_completer, docs):
#     def __init__(self, output=sys.stdout, err=sys.stderr, chdir=os.chdir):
#     def run(self, command, application):
#     def __init__(self, popen_cls=None, env=None, err=sys.stderr):
#     def _get_editor_command(self):
#     def _generate_edit_history(self, application):
#     def run(self, command, application):
#     def __init__(self, output=sys.stdout, err=sys.stderr):
#     def run(self, command, application):
#     def run(self, command, application):
#     def __init__(self, output=sys.stdout, err=sys.stderr):
#     def handle_cmd(self, command, application):
#     def _unknown_cmd(self, cmd_parts, application):
#     def __init__(self, completer, model_completer, docs,
#                  input=None, output=None, popen_cls=None):
#     def load_config(self):
#     def save_config(self):
#     def cli(self):
#     def run(self):
#     def stop_input_and_refresh_cli(self):
#     def create_layout(self, display_completions_in_columns, toolbar):
#     def create_buffer(self, completer, history):
#     def create_key_manager(self):
#         def set_match_fuzzy(match_fuzzy):
#         def set_enable_vi_bindings(enable_vi_bindings):
#         def set_show_completion_columns(show_completion_columns):
#         def set_show_help(show_help):
#     def create_application(self, completer, history,
#                            display_completions_in_columns):
#     def on_input_timeout(self, cli):
#     def create_cli_interface(self, display_completions_in_columns):
#     def profile(self):
#     def profile(self, new_profile_name):
# class InputInterrupt(Exception):
# class ChangeDirHandler(object):
# class EditHandler(object):
# class ProfileHandler(object):
# class ExitHandler(object):
# class DotCommandHandler(object):
# class AWSShell(object):
# 
# Path: awsshell/shellcomplete.py
# LOG = logging.getLogger(__name__)
# class AWSShellCompleter(Completer):
#     def __init__(self, completer, server_side_completer=None):
#     def _create_server_side_completer(self, session=None):
#     def change_profile(self, profile_name):
#     def completer(self):
#     def completer(self, value):
#     def last_option(self):
#     def current_command(self):
#     def _convert_to_prompt_completions(self, low_level_completions,
#                                        text_before_cursor):
#     def get_completions(self, document, complete_event):
# 
# Path: awsshell/compat.py
# PY3 = sys.version_info[0] == 3
# ON_WINDOWS = platform.system() == 'Windows'
#     def default_editor():
#     def default_editor():


# Path: tests/unit/test_app.py
import pytest
import mock
from awsshell import app
from awsshell import shellcomplete
from awsshell import compat





@pytest.fixture
def errstream():
    return compat.StringIO()


def test_can_dispatch_dot_commands():
    call_args = []
    class CustomHandler(object):
        def run(self, command, context):
            call_args.append((command, context))

    handler = app.DotCommandHandler()