diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-12-20 16:06:32 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-12-20 16:06:32 +0000 |
| commit | 11c0b5e8f44986145a384b466952108b462b10f9 (patch) | |
| tree | d984d95c2b0b8beb22e6daad5daa89dbfae2845e /repoze/bfg/testing.py | |
| parent | 02e3c03b940857e851b4e346316afd8704c1292d (diff) | |
| download | pyramid-11c0b5e8f44986145a384b466952108b462b10f9.tar.gz pyramid-11c0b5e8f44986145a384b466952108b462b10f9.tar.bz2 pyramid-11c0b5e8f44986145a384b466952108b462b10f9.zip | |
- Add a ``**kw`` arg to the ``Configurator.add_settings`` API.
Diffstat (limited to 'repoze/bfg/testing.py')
| -rw-r--r-- | repoze/bfg/testing.py | 11 |
1 files changed, 3 insertions, 8 deletions
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 |
