Commit fc400dc2 authored by Andreas Jung's avatar Andreas Jung

more tests

parent b8e42e07
...@@ -47,17 +47,14 @@ html_utf8_w_header = unicode(html_template_w_header, 'iso-8859-15').encode('utf- ...@@ -47,17 +47,14 @@ html_utf8_w_header = unicode(html_template_w_header, 'iso-8859-15').encode('utf-
html_template_wo_header = ''' html_template_wo_header = '''
<html> <html>
<head>
<META http-equiv="content-type" content="text/html; charset=%s">
</hed>
<body> <body>
test test
</body> </body>
</html> </html>
''' '''
html_iso_8859_15_wo_header = html_template_wo_header % 'iso-8859-15' html_iso_8859_15_wo_header = html_template_wo_header
html_utf8_wo_header = unicode(html_template_wo_header, 'iso-8859-15').encode('utf-8') % 'utf-8' html_utf8_wo_header = unicode(html_template_wo_header, 'iso-8859-15').encode('utf-8')
installProduct('PageTemplates') installProduct('PageTemplates')
...@@ -107,6 +104,13 @@ class ZopePageTemplateFileTests(ZopeTestCase): ...@@ -107,6 +104,13 @@ class ZopePageTemplateFileTests(ZopeTestCase):
def testPutHTMLUTF8_WithCharsetInfo(self): def testPutHTMLUTF8_WithCharsetInfo(self):
self.assertEqual(self._put(html_utf8_w_header), 'utf-8') self.assertEqual(self._put(html_utf8_w_header), 'utf-8')
def testPutHTMLIso8859_15WithoutCharsetInfo(self):
self.assertEqual(self._put(html_iso_8859_15_wo_header), 'iso-8859-15')
def testPutHTMLUTF8_WithoutCharsetInfo(self):
import pdb; pdb.set_trace()
self.assertEqual(self._put(html_utf8_wo_header), 'iso-8859-15')
def testPutXMLIso8859_15(self): def testPutXMLIso8859_15(self):
""" XML: use always UTF-8 als output encoding """ """ XML: use always UTF-8 als output encoding """
self.assertEqual(self._put(xml_iso_8859_15), 'utf-8') self.assertEqual(self._put(xml_iso_8859_15), 'utf-8')
......
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