def test_app(): """Create and configure a new app instance for each test.""" app_instance = create_app({ 'TESTING': True }) yield app_instance
# -*- coding: utf-8 -*- import bot import requests from datastore import config from requests_toolbelt.adapters import appengine # Use AppEngineAdapter to support GAE with requests appengine.monkeypatch() app = bot.create_app(config) if __name__ == '__main__': app.run()
def create_app(self): return create_app()
from dotenv import load_dotenv load_dotenv() from bot import create_app from bot.slash_commands.dac import update_player_table app = create_app() # Allows admins to call slash commands for the first time with app.app_context(): update_player_table() if __name__ == "__main__": app.run()
import flask import bot app = bot.create_app() if __name__ == "__main__": app.run()
# -*- coding: utf-8 -*- from bot import create_app from tearup import create_game application = create_app() if __name__ == "__main__": create_game() application.run(host="0.0.0.0")