MCPcopy Index your code
hub / github.com/aws/aws-cli / create_help_command

Method create_help_command

tests/unit/test_clidocs.py:789–805  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

787
788class TestGlobalOptionsDocumenter(unittest.TestCase):
789 def create_help_command(self):
790 types = ['blob', 'integer', 'boolean', 'string']
791 arg_table = {}
792 for t in types:
793 name = f'{t}_type'
794 help_text = f'This arg type is {t}'
795 choices = ['A', 'B', 'C'] if t == 'string' else []
796 arg_table[name] = CustomArgument(
797 name=name,
798 cli_type_name=t,
799 help_text=help_text,
800 choices=choices,
801 )
802 help_command = mock.Mock(spec=HelpCommand)
803 help_command.arg_table = arg_table
804 help_command.doc = ReSTDocument()
805 return help_command
806
807 def create_documenter(self):
808 return GlobalOptionsDocumenter(self.create_help_command())

Callers 1

create_documenterMethod · 0.95

Calls 2

CustomArgumentClass · 0.90
ReSTDocumentClass · 0.90

Tested by

no test coverage detected