[Zope3-checkins]
SVN: Zope3/trunk/src/zope/app/pagetemplate/tests/test_viewzpt.py
Added unit tests for ++debug++source,
tal flags for ViewPageTemplateFile.
Marius Gedminas
marius at pov.lt
Sat Jun 12 10:26:13 EDT 2004
Log message for revision 25399:
Added unit tests for ++debug++source,tal flags for ViewPageTemplateFile.
-=-
Modified: Zope3/trunk/src/zope/app/pagetemplate/tests/test_viewzpt.py
===================================================================
--- Zope3/trunk/src/zope/app/pagetemplate/tests/test_viewzpt.py 2004-06-12 14:14:23 UTC (rev 25398)
+++ Zope3/trunk/src/zope/app/pagetemplate/tests/test_viewzpt.py 2004-06-12 14:26:12 UTC (rev 25399)
@@ -84,7 +84,20 @@
views = namespace['views']
self.failUnless(the_view is views[the_view_name])
+ def test_debug_flags(self):
+ from zope.publisher.browser import TestRequest
+ self.request = TestRequest()
+ self.request.debug.sourceAnnotations = False
+ self.assert_('test.pt' not in self.t(self))
+ self.request.debug.sourceAnnotations = True
+ self.assert_('test.pt' in self.t(self))
+ t = ViewPageTemplateFile('testsimpleviewclass.pt')
+ self.request.debug.showTAL = False
+ self.assert_('metal:' not in t(self))
+ self.request.debug.showTAL = True
+ self.assert_('metal:' in t(self))
+
class TestViewZPTContentType(unittest.TestCase):
def testInitWithoutType(self):
More information about the Zope3-Checkins
mailing list