コード例 #1
0
ファイル: conftest.py プロジェクト: hur/urlshort
def app():
    """Create application for the tests."""
    _app = create_app(testing=True)

    ctx = _app.test_request_context()
    ctx.push()
    yield _app
    ctx.pop()
コード例 #2
0
ファイル: run.py プロジェクト: hur/urlshort
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()
コード例 #3
0
def app():
    app = create_app()
    yield app
コード例 #4
0
def app():
    app = create_app()
    return app