Exemplo n.º 1
0
def client():
    app = create_app('default')

    with app.test_client() as client:
        with app.app_context():
            setup_db(db)
        yield client
Exemplo n.º 2
0
def client():
    app = create_app('default')
    app.config['WTF_CSRF_ENABLED'] = False
    app.config['TESTING'] = True
    with app.test_client() as client:
        with app.app_context():
            setup_db(db)
        yield client
Exemplo n.º 3
0
from flask_migrate import Migrate
import os

from app import create_app, db
from app.util import setup_db

app = create_app(os.getenv('FLASK_CONFIG') or 'postgres')
migrate = Migrate(app, db)

if __name__ == '__main__':
    with app.app_context():
        setup_db(db)