Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
b36a8c63
Commit
b36a8c63
authored
Dec 18, 2006
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more tests
parent
c2761214
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
...thon/Products/PageTemplates/tests/testZopePageTemplate.py
+11
-0
No files found.
lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
View file @
b36a8c63
...
@@ -104,6 +104,17 @@ class ZopePageTemplateFileTests(ZopeTestCase):
...
@@ -104,6 +104,17 @@ class ZopePageTemplateFileTests(ZopeTestCase):
self
.
assertEqual
(
result
.
encode
(
'utf-8'
).
startswith
(
utf8_str
),
True
)
self
.
assertEqual
(
result
.
encode
(
'utf-8'
).
startswith
(
utf8_str
),
True
)
self
.
assertEqual
(
zpt
.
output_encoding
,
'iso-8859-15'
)
self
.
assertEqual
(
zpt
.
output_encoding
,
'iso-8859-15'
)
def
testWriteAcceptsUnicode
(
self
):
manage_addPageTemplate
(
self
.
app
,
'test'
,
''
,
encoding
=
'utf-8'
)
zpt
=
self
.
app
[
'test'
]
zpt
.
write
(
u'this is unicode'
)
def
testWriteWontAcceptsNonUnicode
(
self
):
manage_addPageTemplate
(
self
.
app
,
'test'
,
''
,
encoding
=
'utf-8'
)
zpt
=
self
.
app
[
'test'
]
self
.
assertRaises
(
TypeError
,
zpt
.
write
,
'this is not unicode'
)
def
_createZPT
(
self
):
def
_createZPT
(
self
):
manage_addPageTemplate
(
self
.
app
,
'test'
,
text
=
utf8_str
,
encoding
=
'utf-8'
)
manage_addPageTemplate
(
self
.
app
,
'test'
,
text
=
utf8_str
,
encoding
=
'utf-8'
)
zpt
=
self
.
app
[
'test'
]
zpt
=
self
.
app
[
'test'
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment