From 11c0b5e8f44986145a384b466952108b462b10f9 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 20 Dec 2009 16:06:32 +0000 Subject: - Add a ``**kw`` arg to the ``Configurator.add_settings`` API. --- repoze/bfg/testing.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'repoze/bfg/testing.py') diff --git a/repoze/bfg/testing.py b/repoze/bfg/testing.py index 9912fd514..7721023b5 100644 --- a/repoze/bfg/testing.py +++ b/repoze/bfg/testing.py @@ -326,14 +326,9 @@ def registerSettings(dictarg=None, **kw): Instead use the ``add_settings`` method of a :term:`Configurator` in your unit and integration tests. """ - reg = get_current_registry() - settings = reg.queryUtility(ISettings) - if settings is None: - settings = Settings() - reg.registerUtility(settings, ISettings) - if dictarg is not None: - settings.update(dictarg) - settings.update(kw) + registry = get_current_registry() + config = Configurator(registry=registry) + config.add_settings(dictarg, **kw) class DummyRootFactory(object): __parent__ = None -- cgit v1.2.3