Ejemplo n.º 1
0
def testapp(request):
    app = create_app('ticketplace.settings.TestConfig')
    client = app.test_client()

    db.app = app
    db.create_all()

    def teardown():
        db.session.remove()
        db.drop_all()

    request.addfinalizer(teardown)

    return client
Ejemplo n.º 2
0
def createdb():
    """ Creates a database with all of the tables defined in
        your SQLAlchemy models
    """

    db.create_all()