def testapp(request): app = create_app('dicom_upload.settings.TestConfig', env='dev') client = app.test_client() db.app = app db.create_all() def teardown(): db.session.remove() db.drop_all() request.addfinalizer(teardown) return client
def createdb(): """ Creates a database with all of the tables defined in your SQLAlchemy models """ db.create_all()