def app(app_settings): from snovault import main app = main({}, **app_settings) yield app DBSession = app.registry[DBSESSION] # Dispose connections so postgres can tear down. DBSession.bind.pool.dispose()
def app(app_settings): from snovault import main app = main({}, **app_settings) yield app # Shutdown multiprocessing pool to close db conns. from snovault.elasticsearch import INDEXER app.registry[INDEXER].shutdown() from snovault import DBSESSION DBSession = app.registry[DBSESSION] # Dispose connections so postgres can tear down. DBSession.bind.pool.dispose()
def app(app_settings): '''WSGI application level functional testing. will have to make snovault dummy main app ''' from snovault import main return main({}, **app_settings)