'formatter': 'colored' } }, 'root': { 'level': 'INFO', 'propogate': True, 'handlers': ['wsgi'] } }) app = Flask(__name__) # HTTP security header middleware for Flask talisman = Talisman(app) talisman.force_https = False config = Config() command_parser = make_command_parser(config) github_webhook_handler = make_github_webhook_handler(config) slack_events_handler = make_slack_events_handler(config) slack_events_adapter = SlackEventAdapter(config.slack_signing_secret, "/slack/events", app) sched = Scheduler(BackgroundScheduler(timezone="America/Los_Angeles"), (app, config)) sched.start() bot = Bot(WebClient(config.slack_api_token), config.slack_bot_channel) bot.send_to_channel('rocket2 has restarted successfully! :clap: :clap:', config.slack_bot_channel) @app.route('/') def check():
}, 'handlers': loggingHandlersConfig, 'root': { 'level': 'INFO', 'propagate': True, 'handlers': loggingHandlers } } dictConfig(loggingConfig) app = Flask(__name__) # HTTP security header middleware for Flask talisman = Talisman(app) talisman.force_https = False github_interface = make_github_interface(config) command_parser = make_command_parser(config, github_interface) github_webhook_handler = make_github_webhook_handler(github_interface, config) slack_events_handler = make_slack_events_handler(config) slack_events_adapter = SlackEventAdapter(config.slack_signing_secret, "/slack/events", app) sched = Scheduler(BackgroundScheduler(timezone="America/Los_Angeles"), (app, config)) sched.start() bot = Bot(WebClient(config.slack_api_token), config.slack_notification_channel) bot.send_to_channel('rocket2 has restarted successfully! :clap: :clap:', config.slack_notification_channel) @app.route('/') def check():
def test_make_command_parser(test_config): """Test the make_command_parser function.""" parser = make_command_parser(test_config) assert isinstance(parser, CommandParser)