From 5babbaf48a71af786d41f59a1f1f7d5272a60a4d Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 17 Dec 2009 01:17:48 +0000 Subject: - When Chameleon page or text templates were added imperatively (via ``Configurator.add_view`` or some derivative), they too-eagerly attempted to look up the ``reload_templates`` setting via ``get_settings``, meaning they were always registered in non-auto-reload-mode (the default). Each now waits until its respective ``template`` attribute is accessed to look up the value. --- repoze/bfg/tests/test_chameleon_text.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'repoze/bfg/tests/test_chameleon_text.py') diff --git a/repoze/bfg/tests/test_chameleon_text.py b/repoze/bfg/tests/test_chameleon_text.py index 54ffc8b10..007c102e3 100644 --- a/repoze/bfg/tests/test_chameleon_text.py +++ b/repoze/bfg/tests/test_chameleon_text.py @@ -47,6 +47,13 @@ class TextTemplateRendererTests(Base, unittest.TestCase): from repoze.bfg.interfaces import ITemplateRenderer verifyClass(ITemplateRenderer, self._getTargetClass()) + def test_template_reified(self): + minimal = self._getTemplatePath('minimal.txt') + instance = self._makeOne(minimal) + self.failIf('template' in instance.__dict__) + template = instance.template + self.assertEqual(template, instance.__dict__['template']) + def test_call(self): minimal = self._getTemplatePath('minimal.txt') instance = self._makeOne(minimal) -- cgit v1.2.3