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()
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
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()