Exemplo 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)
Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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
Exemplo n.º 6
0
def createdb():
    """ Create the database schema. """
    db.create_all()
Exemplo n.º 7
0
def createdb():
    """ Create the SQLAlchemy database. """
    db.create_all()
Exemplo n.º 8
0
def createdb():
    """ Create the database schema. """
    db.create_all()
Exemplo n.º 9
0
def createdb():
    """ Create the SQLAlchemy database. """
    db.create_all()