Esempio n. 1
0
def make_test_app(use_cookies=False):
    app.config['TESTING'] = True
    app.config['CACHE'] = False
    app.config['PLUGINS'] = []
    app.config['CELERY_ALWAYS_EAGER'] = True
    app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///:memory:'
    db.create_all()

    return app.test_client(use_cookies=use_cookies)
Esempio n. 2
0
def make_test_app(use_cookies=False):
    app.config['TESTING'] = True
    app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///:memory:'
    #import ipdb; ipdb.set_trace()
    from grano.model import Account
    db.create_all()
    client = app.test_client(use_cookies=use_cookies)
    app.test_user = Account.create(TEST_USER)
    db.session.commit()
    return client
Esempio n. 3
0
def make_test_app(use_cookies=False):
    app.config['TESTING'] = True
    app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///:memory:'
    #import ipdb; ipdb.set_trace()
    from grano.model import Account
    db.create_all()
    client = app.test_client(use_cookies=use_cookies)
    app.test_user = Account.create(TEST_USER)
    db.session.commit()
    return client
Esempio n. 4
0
def make_test_app(use_cookies=False):
    """For some reason this does not work when imported from util.
    Error is:
        AttributeError: 'FlaskClient' object has no attribute 'test_request_context'
    """
    app.config['TESTING'] = True
    app.config['CACHE'] = False
    app.config['PLUGINS'] = []
    app.config['CELERY_ALWAYS_EAGER'] = True
    app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///:memory:'
    db.create_all()
    create_fixtures()
    return app
Esempio n. 5
0
def make_test_app(use_cookies=False):
    """For some reason this does not work when imported from util.
    Error is:
        AttributeError: 'FlaskClient' object has no attribute 'test_request_context'
    """
    app.config['TESTING'] = True
    app.config['CACHE'] = False
    app.config['PLUGINS'] = []
    app.config['CELERY_ALWAYS_EAGER'] = True
    app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///:memory:'
    db.create_all()
    create_fixtures()
    return app
Esempio n. 6
0
def createdb():
    """ Create the database schema. """
    db.create_all()
Esempio n. 7
0
def createdb():
    """ Create the SQLAlchemy database. """
    db.create_all()
Esempio n. 8
0
def createdb():
    """ Create the database schema. """
    db.create_all()
Esempio n. 9
0
def createdb():
    """ Create the SQLAlchemy database. """
    db.create_all()