Skip to content

Commit

Permalink
Add various missing unicode string prefixes to make parsing work agai…
Browse files Browse the repository at this point in the history
…n (py27)
  • Loading branch information
dwt authored and hannosch committed May 13, 2017
1 parent 919b17c commit d2920a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Products/PageTemplates/tests/testZopePageTemplate.py
Expand Up @@ -55,7 +55,7 @@
html_binary_iso_8859_15_w_header = (html_template_w_header % 'iso-8859-15').encode('iso-8859-15')
html_binary_utf8_w_header = (html_template_w_header % 'utf-8').encode('utf-8')

html_template_wo_header = '''
html_template_wo_header = u'''
<html>
<body>
test üöäÜÖÄß
Expand Down Expand Up @@ -160,7 +160,7 @@ def testUTF8WrongPreferredCharset(self):
def testStructureWithAccentedChars(self):
manage_addPageTemplate(self.app, 'test',
text=((u'<div tal:content="structure '
'python: \'üöä\'" />').encode('iso-8859-15')),
u'python: \'üöä\'" />').encode('iso-8859-15')),
encoding='iso-8859-15')
zpt = self.app['test']
self.app.REQUEST.set('HTTP_ACCEPT_CHARSET', 'iso-8859-15,utf-8')
Expand All @@ -170,7 +170,7 @@ def testStructureWithAccentedChars(self):
def testBug151020(self):
manage_addPageTemplate(self.app, 'test',
text=((u'<div tal:content="structure '
'python: \'üöä\'" />').encode('iso-8859-15')),
u'python: \'üöä\'" />').encode('iso-8859-15')),
encoding='iso-8859-15')
zpt = self.app['test']
self.app.REQUEST.set('HTTP_ACCEPT_CHARSET',
Expand Down Expand Up @@ -354,7 +354,7 @@ def testPreferredCharsetResolverWithoutRequestAndWithEncoding(self):
class ContextMock:
management_page_charset = 'utf-8'
result = PreferredCharsetResolver.resolve(ContextMock(), 'üöä', None)
self.assertEqual(result, 'üöä')
self.assertEqual(result, u'üöä')


class ZPTRegressions(unittest.TestCase):
Expand Down

0 comments on commit d2920a1

Please sign in to comment.