def __init__(self, config=None, argv=None): super(Console, self).__init__(config) self.config = dict_deep_update( {'commands': find_commands_in_module(DefaultConsoleCommands)}, self.config) self.runner = Runner(argv, commands=self.config.get('commands')) self.runner.get_command = self.get_command
def __init__(self, config=None, argv=None): super(Console, self).__init__(config) self.config = dict_deep_update({ 'commands': find_commands_in_module(DefaultConsoleCommands) }, self.config) self.runner = Runner(argv, commands=self.config.get('commands')) self.runner.get_command = self.get_command
def _load_default_commands(self, config): """Load default database commands and append to application config. """ existing_commands = config.get('commands', []) db_commands = find_commands_in_module(commands) db_commands.extend(existing_commands) config['commands'] = db_commands
def test_find_commands(self): commands = find_commands_in_module(support) assert len(commands) == 7
def load_default_commands(self, config): existing_commands = config.get('commands', []) db_commands = find_commands_in_module(commands) db_commands.extend(existing_commands) config['commands'] = db_commands