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
c787fb6d
Commit
c787fb6d
authored
Mar 13, 2006
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some more tests to document the conversion behavior before
the next docutils migration
parent
6d3d9db3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
lib/python/Products/ZReST/tests/test_ZReST.py
lib/python/Products/ZReST/tests/test_ZReST.py
+35
-0
No files found.
lib/python/Products/ZReST/tests/test_ZReST.py
View file @
c787fb6d
# -*- coding: iso-8859-15 -*-
""" Unit tests for ZReST objects
$Id$
"""
import
unittest
txt
=
"""Hello World
============
text text
Von Vgeln und fen
===================
- some
- more
- text
"""
class
TestZReST
(
unittest
.
TestCase
):
def
_getTargetClass
(
self
):
...
...
@@ -29,6 +45,25 @@ class TestZReST(unittest.TestCase):
self
.
failIf
(
'IGNORE ME'
in
resty
.
index_html
())
def
testConversion
(
self
):
resty
=
self
.
_makeOne
()
resty
.
source
=
txt
resty
.
input_encoding
=
'iso-8859-15'
resty
.
output_encoding
=
'iso-8859-15'
resty
.
render
()
html
=
resty
.
index_html
()
s
=
'<h1><a name="hello-world">Hello World</a></h1>'
self
.
assertEqual
(
s
in
html
,
True
)
s
=
'<h1><a name="von-v-geln-und-fen">Von Vgeln und fen</a></h1>'
self
.
assertEqual
(
s
in
html
,
True
)
# ZReST should render a complete HTML document
self
.
assertEqual
(
'<html'
in
html
,
True
)
self
.
assertEqual
(
'<body>'
in
html
,
True
)
def
test_suite
():
suite
=
unittest
.
TestSuite
()
suite
.
addTest
(
unittest
.
makeSuite
(
TestZReST
))
...
...
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