Commit 88301ada authored by Lennart Regebro's avatar Lennart Regebro

A new test and a new fix.

parent 5d6340ba
......@@ -134,6 +134,14 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable,
self.ZBindings_edit(self._default_bindings)
self.pt_edit(text, content_type, encoding)
def pt_render(self, namespace, source=False, sourceAnnotations=False,
showtal=False):
if namespace is None:
namespace = self.pt_getContext()
return super(ZopePageTemplate, self).pt_render(namespace, source, sourceAnnotations,
showtal)
def pt_getEngine(self):
return getEngine()
......
......@@ -94,6 +94,12 @@ class ZPTMacros(unittest.TestCase):
pt = self.app.pt1
self.assertEqual(pt(), self.result)
def testPtErrors(self):
request = self.app.REQUEST
self._addPT('pt1', text=self.text, REQUEST=request)
pt = self.app.pt1
pt.pt_render(None, source=1)
self.assertEqual(pt.pt_errors(None), None)
class DummyFileUpload:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment