예제 #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)
예제 #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
예제 #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
예제 #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
예제 #5
0
파일: test_authz.py 프로젝트: 01-/grano
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
예제 #6
0
def createdb():
    """ Create the database schema. """
    db.create_all()
예제 #7
0
def createdb():
    """ Create the SQLAlchemy database. """
    db.create_all()
예제 #8
0
파일: manage.py 프로젝트: eocaollai/grano
def createdb():
    """ Create the database schema. """
    db.create_all()
예제 #9
0
파일: manage.py 프로젝트: jmorenoamor/grano
def createdb():
    """ Create the SQLAlchemy database. """
    db.create_all()