Beispiel #1
0
def app(request):
    db_fd, temp_db_location = tempfile.mkstemp()
    config = {'DATABASE': temp_db_location, 'TESTING': True, 'DB_FD': db_fd}

    app = create_app(config=config)

    with app.app_context():
        init_db()
        yield app
Beispiel #2
0
def app(request):
    db_fd.temp_db_location = tempfile.mkstemp()
    config = {
            'DATABASE':temp_db_location,
            'TESTING':True,
            'DB_FD':db_fd
            }
    app = create_app(config=config)

    with app.app_context():
        init_db()
        yield app
Beispiel #3
0
def app():
    db_fd, db_path = tempfile.mkstemp()
    config = {
        'DATABASE': db_path,
        'TESTING': True,
    }
    app = create_app(config=config)

    with app.app_context():
        init_db()
        yield app

    os.close(db_fd)
    os.unlink(db_path)
Beispiel #4
0
def app():
    db_fd, db_path = tempfile.mkstemp()
    config = {
        'DATABASE': db_path,
        'TESTING': True,
    }
    app = create_app(config=config)

    with app.app_context():
        init_db()
        yield app

    os.close(db_fd)
    os.unlink(db_path)
Beispiel #5
0
 def initdb_command():
     """Creates the database tables."""
     init_db()
     print('Initialized the database.')
Beispiel #6
0
 def initdb_command():
     """Creates the database tables."""
     init_db()
     print('Initialized the database.')
Beispiel #7
0
 def initdb_command():
     init_db()
     print('Initialized the database')