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 tearDown(): from kotti import events from kotti import security from kotti.message import _inject_mailer # These should arguable use the configurator, so they don't need # to be torn down separately: events.clear() security.reset() _inject_mailer[:] = [] transaction.abort() testing.tearDown()