Example #1
0
 def test_basic_help_with_contents(self):
     cmd_object = mock.Mock()
     mock_module = mock.Mock()
     mock_module.__file__ = '/some/root'
     cmd_object.DESCRIPTION = BasicCommand.FROM_FILE(
         'foo', 'bar', 'baz.txt', root_module=mock_module)
     help_command = BasicHelp(mock.Mock(), cmd_object, {}, {})
     with mock.patch('awscli.customizations.commands._open') as mock_open:
         mock_open.return_value.__enter__.return_value.read.return_value = \
             'fake description'
         self.assertEqual(help_command.description, 'fake description')
Example #2
0
 def create_help_command(self):
     return BasicHelp(self.session, self.obj, self.command_table,
                      self.arg_table)
 def create_help_command(self):
     return BasicHelp(self._session,
                      self,
                      command_table=self.subcommand_table,
                      arg_table=self.arg_table,
                      event_handler_class=WaiterCommandDocHandler)