Example #1
0
 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
Example #2
0
 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
Example #3
0
 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
Example #4
0
 def test_find_commands(self):
     commands = find_commands_in_module(support)
     assert len(commands) == 7
Example #5
0
 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
Example #6
0
 def test_find_commands(self):
     commands = find_commands_in_module(support)
     assert len(commands) == 7