Beispiel #1
0
def start():
    """Start the opsdroid bot."""
    check_dependencies()

    config = Loader.load_config_file([
        "configuration.yaml", DEFAULT_CONFIG_PATH,
        "/etc/opsdroid/configuration.yaml"
    ])
    configure_lang(config)
    configure_logging(config)
    welcome_message(config)

    with OpsDroid(config=config) as opsdroid:
        opsdroid.run()
Beispiel #2
0
def start(path):
    """Start the opsdroid bot.

    If the `-f` flag is used with this command, opsdroid will load the
    configuration specified on that path otherwise it will use the default
    configuration.

    """
    check_dependencies()

    config = load_config_file([path] if path else DEFAULT_CONFIG_LOCATIONS)

    configure_lang(config)
    configure_logging(config)
    welcome_message(config)

    with OpsDroid(config=config) as opsdroid:
        opsdroid.run()
Beispiel #3
0
    def test_welcome_exception(self):
        config = {}
        from opsdroid.cli.utils import welcome_message

        response = welcome_message(config)
        self.assertIsNone(response)
Beispiel #4
0
    def test_welcome_message(self):
        config = {"welcome-message": True}
        from opsdroid.cli.utils import welcome_message

        welcome_message(config)
        self.assertLogs("_LOGGER", "info")