Пример #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_app():
    app.config['MONGODB_DATABASE'] = 'grano_test'
    mongo_connect()
    app.config['TESTING'] = True
    _app = app.test_client()
    return _app
Пример #3
0
def make_app():
    app.config['MONGODB_DATABASE'] = 'grano_test'
    mongo_connect()
    app.config['TESTING'] = True
    _app = app.test_client()
    return _app