示例#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()