def app(): _app = create_app( "test", { "RATELIMIT_ENABLED": True, "RATELIMIT_VALUE": "2/minute", "RATELIMIT_STORAGE_URL": "memory://", }, ) ctx = _app.app_context() ctx.push() db.create_all() yield _app
def app(): _app = create_app("test") ctx = _app.app_context() ctx.push() # create the tables db.create_all() yield _app # drop the tables db.session.close() db.drop_all()