Esempio n. 1
0
def test_accession_app(request, check_constraints, zsa_savepoints,
                       app_settings):
    from snowflakes import main
    app_settings = app_settings.copy()
    app_settings[
        'accession_factory'] = 'snowflakes.server_defaults.test_accession'
    return main({}, **app_settings)
Esempio n. 2
0
def app(app_settings):
    from snowflakes import main
    from snovault.elasticsearch import create_mapping
    app = main({}, **app_settings)

    create_mapping.run(app, skip_indexing=True)
    yield app

    from snovault import DBSESSION
    DBSession = app.registry[DBSESSION]
    # Dispose connections so postgres can tear down.
    DBSession.bind.pool.dispose()
Esempio n. 3
0
def app(app_settings):
    from snowflakes import main
    from snovault.elasticsearch import create_mapping
    app = main({}, **app_settings)

    create_mapping.run(app)
    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 test_accession_app(request, check_constraints, zsa_savepoints, app_settings):
    from snowflakes import main
    app_settings = app_settings.copy()
    app_settings['accession_factory'] = 'snowflakes.server_defaults.test_accession'
    return main({}, **app_settings)
Esempio n. 5
0
def app(app_settings):
    '''WSGI application level functional testing.
    '''
    from snowflakes import main
    return main({}, **app_settings)