summaryrefslogtreecommitdiff
path: root/repoze/bfg/tests/test_settings.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-07-02 07:15:44 +0000
committerChris McDonough <chrism@agendaless.com>2009-07-02 07:15:44 +0000
commit1eb861e0f046397715a92ed7ad7b85a2baa22b29 (patch)
treefb38becdf9654925f1ec92b5998e2da53678f508 /repoze/bfg/tests/test_settings.py
parent0af38fb5dd7c59fb0ce185edd76064b3db4cabdd (diff)
downloadpyramid-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.py11
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')