def app(): """Create application for the tests.""" _app = create_app(testing=True) ctx = _app.test_request_context() ctx.push() yield _app ctx.pop()
from urlshort import create_app from urlshort.models import db from urlshort.strings import Strings app = create_app() @app.cli.command() def createdb(): db.create_all()
def app(): app = create_app() yield app
def app(): app = create_app() return app