예제 #1
0
def config(settings):
    """ returns a Pyramid `Configurator` object initialized
        with Kotti's default (test) settings.
    """
    from pyramid import testing
    from kotti import security
    config = testing.setUp(settings=settings)
    config.include('pyramid_chameleon')
    config.add_default_renderers()
    yield config
    security.reset()
    testing.tearDown()
예제 #2
0
def config(request, settings):
    """ returns a Pyramid `Configurator` object initialized
        with Kotti's default (test) settings.
    """
    from pyramid import testing
    from kotti import security
    config = testing.setUp(settings=settings)
    config.include('pyramid_chameleon')
    config.add_default_renderers()
    request.addfinalizer(security.reset)
    request.addfinalizer(testing.tearDown)
    return config
예제 #3
0
파일: __init__.py 프로젝트: Kotti/Kotti
def config(settings):
    """ returns a Pyramid `Configurator` object initialized
        with Kotti's default (test) settings.
    """
    from pyramid import testing
    from kotti import security

    config = testing.setUp(settings=settings)
    config.include("pyramid_chameleon")
    config.add_default_renderers()
    yield config
    security.reset()
    testing.tearDown()