[Checkins]
SVN: Zope/branches/2.10/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
test for unicode workaround in ZRPythonExpr
Andreas Jung
andreas at andreas-jung.com
Wed Feb 21 06:37:26 EST 2007
Log message for revision 72744:
test for unicode workaround in ZRPythonExpr
Changed:
U Zope/branches/2.10/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
-=-
Modified: Zope/branches/2.10/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
===================================================================
--- Zope/branches/2.10/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py 2007-02-21 11:36:18 UTC (rev 72743)
+++ Zope/branches/2.10/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py 2007-02-21 11:37:25 UTC (rev 72744)
@@ -132,6 +132,15 @@
self.assertEqual(result.encode('ascii').startswith(ascii_str), True)
self.assertEqual(zpt.output_encoding, 'iso-8859-15')
+ def testPT_RenderUnicodeExpr(self):
+ # Check workaround for unicode incompatibility of ZRPythonExpr.
+ # See http://mail.zope.org/pipermail/zope/2007-February/170537.html
+ manage_addPageTemplate(self.app, 'test',
+ text='<span tal:content="python: unicode(\'\xfe\', \'iso-8859-15\')" />',
+ encoding='iso-8859-15')
+ zpt = self.app['test']
+ result = zpt.pt_render() # should not raise a UnicodeDecodeError
+
def testPT_RenderWithISO885915(self):
manage_addPageTemplate(self.app, 'test', text=iso885915_str, encoding='iso-8859-15')
zpt = self.app['test']
More information about the Checkins
mailing list