# Path: cliff/command.py
# def _get_distributions_by_modules():
# def _get_distribution_for_module(module):
#     def __init__(self, app, app_args, cmd_name=None):
#     def _load_hooks(self):
#     def get_description(self):
#     def get_epilog(self):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def run(self, parsed_args):
#     def _run_before_hooks(self, parsed_args):
#     def _run_after_hooks(self, parsed_args, return_code):
# class Command(object, metaclass=abc.ABCMeta):


import argparse
import functools
from cliff import command
from cliff.tests import base
    def test_get_description_default(self):
        cmd = TestCommandNoDocstring(None, None)
        desc = cmd.get_description()
        assert desc == ''


class TestBasicValues(base.TestBase):

    def test_get_parser(self):
        cmd = TestCommand(None, None)
        parser = cmd.get_parser('NAME')
        assert parser.prog == 'NAME'

    def test_get_name(self):
        cmd = TestCommand(None, None, cmd_name='object action')
        assert cmd.cmd_name == 'object action'

    def test_run_return(self):
        cmd = TestCommand(None, None, cmd_name='object action')
        assert cmd.run(None) == 42


expected_help_message = """
  long_help_argument    Create a NIC on the server.
                        Specify option multiple times to create multiple NICs.
                        Either net-id or port-id must be provided, but not
                        both.
                        net-id: attach NIC to network with this UUID
                        port-id: attach NIC to port with this UUID
                        v4-fixed-ip: IPv4 fixed address for NIC (optional)

# Path: cliff/command.py
# def _get_distributions_by_modules():
# def _get_distribution_for_module(module):
#     def __init__(self, app, app_args, cmd_name=None):
#     def _load_hooks(self):
#     def get_description(self):
#     def get_epilog(self):
#     def get_parser(self, prog_name):
#     def take_action(self, parsed_args):
#     def run(self, parsed_args):
#     def _run_before_hooks(self, parsed_args):
#     def _run_after_hooks(self, parsed_args, return_code):
# class Command(object, metaclass=abc.ABCMeta):


# Path: cliff/tests/test_command.py
import argparse
import functools
from cliff import command
from cliff.tests import base

    def test_get_description_default(self):
        cmd = TestCommandNoDocstring(None, None)
        desc = cmd.get_description()
        assert desc == ''


class TestBasicValues(base.TestBase):

    def test_get_parser(self):
        cmd = TestCommand(None, None)
        parser = cmd.get_parser('NAME')
        assert parser.prog == 'NAME'

    def test_get_name(self):
        cmd = TestCommand(None, None, cmd_name='object action')
        assert cmd.cmd_name == 'object action'

    def test_run_return(self):
        cmd = TestCommand(None, None, cmd_name='object action')
        assert cmd.run(None) == 42


expected_help_message = """
  long_help_argument    Create a NIC on the server.
                        Specify option multiple times to create multiple NICs.
                        Either net-id or port-id must be provided, but not
                        both.
                        net-id: attach NIC to network with this UUID
                        port-id: attach NIC to port with this UUID
                        v4-fixed-ip: IPv4 fixed address for NIC (optional)

                        v6-fixed-ip: IPv6 fixed address for NIC (optional)