Commit c787fb6d authored by Andreas Jung's avatar Andreas Jung

some more tests to document the conversion behavior before

the next docutils migration
parent 6d3d9db3
# -*- 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))
......
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