diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-11-24 22:08:04 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-11-24 22:08:04 +0000 |
| commit | a7e6f2cdec94fc98c0bb670f545449a9d0a84f58 (patch) | |
| tree | 6095ac5a62420de408ed916795d5796a7ba9b28a /repoze/bfg/testing.py | |
| parent | 13c923f6eaf56a49897af75e14c1f70d1b26c75b (diff) | |
| download | pyramid-a7e6f2cdec94fc98c0bb670f545449a9d0a84f58.tar.gz pyramid-a7e6f2cdec94fc98c0bb670f545449a9d0a84f58.tar.bz2 pyramid-a7e6f2cdec94fc98c0bb670f545449a9d0a84f58.zip | |
Make hooking getSiteManager optional.
Diffstat (limited to 'repoze/bfg/testing.py')
| -rw-r--r-- | repoze/bfg/testing.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/repoze/bfg/testing.py b/repoze/bfg/testing.py index 4a4acf98b..cfcf82125 100644 --- a/repoze/bfg/testing.py +++ b/repoze/bfg/testing.py @@ -523,13 +523,14 @@ class DummyRequest: self.__dict__.update(kw) def setUp(): - """Set up a fresh BFG testing registry. Use in the ``setUp`` + """ + Set up a fresh BFG testing registry. Use in the ``setUp`` method of unit tests that use the ``register*`` methods in the testing module (e.g. if your unit test uses ``repoze.bfg.testing.registerDummySecurityPolicy``). If you use the ``register*`` functions without calling ``setUp``, unit tests will not be isolated with respect to registrations they perform. - Additionally, the *global* component registry will be used, which + Additionally, a *global* component registry will be used, which may have a different API than is expected by BFG itself. .. note:: This feature is new as of :mod:`repoze.bfg` 1.1. @@ -541,7 +542,7 @@ def setUp(): request.registry = registry manager.push({'registry':registry, 'request':request}) getSiteManager.sethook(get_current_registry) - _clearContext() + _clearContext() # XXX why? def tearDown(): """Tear down a previously set up (via |
