diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-11-28 19:22:23 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-11-28 19:22:23 +0000 |
| commit | fe399b8d88746fda216a66bf80f6185ddf0fbac2 (patch) | |
| tree | cf94dbf01f9f57559e6fb391252a201cf8b484db | |
| parent | a468e74f6044788097ac9b72f7232ff4e47fe91c (diff) | |
| download | pyramid-fe399b8d88746fda216a66bf80f6185ddf0fbac2.tar.gz pyramid-fe399b8d88746fda216a66bf80f6185ddf0fbac2.tar.bz2 pyramid-fe399b8d88746fda216a66bf80f6185ddf0fbac2.zip | |
Clarify.
| -rw-r--r-- | repoze/bfg/configuration.py | 1 | ||||
| -rw-r--r-- | repoze/bfg/testing.py | 15 |
2 files changed, 9 insertions, 7 deletions
diff --git a/repoze/bfg/configuration.py b/repoze/bfg/configuration.py index 4b235e864..c37ed2c72 100644 --- a/repoze/bfg/configuration.py +++ b/repoze/bfg/configuration.py @@ -155,7 +155,6 @@ class Configurator(object): authorization_policy) for name, renderer in renderers: self.add_renderer(name, renderer) - def _set_settings(self, mapping): settings = Settings(mapping or {}) diff --git a/repoze/bfg/testing.py b/repoze/bfg/testing.py index 97956ef48..1859cf9b8 100644 --- a/repoze/bfg/testing.py +++ b/repoze/bfg/testing.py @@ -526,16 +526,19 @@ class DummyRequest: def setUp(registry=None, request=None, hook_zca=True): """ Set BFG registry and request thread locals for the duration of a - unit test. + single unit test. .. note:: The ``setUp`` function is new as of :mod:`repoze.bfg` 1.1. - Use in the ``setUp`` method of unit test code which uses any of - the ``register*`` functions in ``repoze.bfg.testing`` (such as - ``repoze.bfg.testing.registerDummySecurityPolicy``) or unit test - code that uses the ``repoze.bfg.threadlocal.get_current_registry`` - or ``repoze.bfg.threadlocal.get_current_request`` functions. + Use this function in the ``setUp`` method of a unit test test case + which directly or indirectly uses: + + - any of the ``register*`` functions in ``repoze.bfg.testing`` + (such as ``repoze.bfg.testing.registerModels``) + + - the ``repoze.bfg.threadlocal.get_current_registry`` or + ``repoze.bfg.threadlocal.get_current_request`` functions. If you use the ``testing.register*`` APIs, or the ``get_current_*`` functions (or call :mod:`repoze.bfg` code that |
