diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-07-02 07:15:44 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-07-02 07:15:44 +0000 |
| commit | 1eb861e0f046397715a92ed7ad7b85a2baa22b29 (patch) | |
| tree | fb38becdf9654925f1ec92b5998e2da53678f508 /repoze/bfg/tests/test_settings.py | |
| parent | 0af38fb5dd7c59fb0ce185edd76064b3db4cabdd (diff) | |
| download | pyramid-1eb861e0f046397715a92ed7ad7b85a2baa22b29.tar.gz pyramid-1eb861e0f046397715a92ed7ad7b85a2baa22b29.tar.bz2 pyramid-1eb861e0f046397715a92ed7ad7b85a2baa22b29.zip | |
- Allow a Paste config file (``configure_zcml``) value or an
environment variable (``BFG_CONFIGURE_ZCML``) to name a ZCML file
that will be used to bootstrap the application. Previously, the
integrator could not influence which ZCML file was used to do the
boostrapping (only the original application developer could do so).
Diffstat (limited to 'repoze/bfg/tests/test_settings.py')
| -rw-r--r-- | repoze/bfg/tests/test_settings.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/repoze/bfg/tests/test_settings.py b/repoze/bfg/tests/test_settings.py index 8319a302d..bef8297bf 100644 --- a/repoze/bfg/tests/test_settings.py +++ b/repoze/bfg/tests/test_settings.py @@ -148,6 +148,17 @@ class TestGetOptions(unittest.TestCase): self.assertEqual(result['debug_notfound'], True) self.assertEqual(result['debug_authorization'], True) + def test_configure_zcml(self): + result = self._callFUT({}) + self.assertEqual(result['configure_zcml'], '') + result = self._callFUT({'configure_zcml':'abc'}) + self.assertEqual(result['configure_zcml'], 'abc') + result = self._callFUT({}, {'BFG_CONFIGURE_ZCML':'abc'}) + self.assertEqual(result['configure_zcml'], 'abc') + result = self._callFUT({'configure_zcml':'def'}, + {'BFG_CONFIGURE_ZCML':'abc'}) + self.assertEqual(result['configure_zcml'], 'abc') + def test_originals_kept(self): result = self._callFUT({'a':'i am so a'}) self.assertEqual(result['a'], 'i am so a') |
