From fe399b8d88746fda216a66bf80f6185ddf0fbac2 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 28 Nov 2009 19:22:23 +0000 Subject: Clarify. --- repoze/bfg/configuration.py | 1 - 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 -- cgit v1.2.3