diff options
author | Waylan Limberg <waylan@gmail.com> | 2011-07-27 11:27:13 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2011-07-27 11:27:13 -0400 |
commit | 5ad27f85db3e5c0a0e6f05ab099bfbfc8b0d0dd5 (patch) | |
tree | 2e854e4992e4a4f044d9c4d8db1105e097514b42 /tests | |
parent | 1fbd6ebdcc913e4dae5030d35009d4d3bb803916 (diff) | |
download | markdown-5ad27f85db3e5c0a0e6f05ab099bfbfc8b0d0dd5.tar.gz markdown-5ad27f85db3e5c0a0e6f05ab099bfbfc8b0d0dd5.tar.bz2 markdown-5ad27f85db3e5c0a0e6f05ab099bfbfc8b0d0dd5.zip |
All API tests now utilize our own searializers.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_apis.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/test_apis.py b/tests/test_apis.py index 042b1c1..c9e89ad 100644 --- a/tests/test_apis.py +++ b/tests/test_apis.py @@ -46,7 +46,8 @@ class TestBlockParser(unittest.TestCase): root = markdown.util.etree.Element("div") text = 'foo' self.parser.parseChunk(root, text) - self.assertEqual(markdown.util.etree.tostring(root), "<div><p>foo</p></div>") + self.assertEqual(markdown.searializers.to_xhtml_string(root), + "<div><p>foo</p></div>") def testParseDocument(self): """ Test BlockParser.parseDocument. """ @@ -54,7 +55,7 @@ class TestBlockParser(unittest.TestCase): tree = self.parser.parseDocument(lines) self.assert_(isinstance(tree, markdown.util.etree.ElementTree)) self.assert_(markdown.util.etree.iselement(tree.getroot())) - self.assertEqual(markdown.util.etree.tostring(tree.getroot()), + self.assertEqual(markdown.searializers.to_xhtml_string(tree.getroot()), "<div><h1>foo</h1><p>bar</p><pre><code>baz\n</code></pre></div>") @@ -353,5 +354,6 @@ class testAtomicString(unittest.TestCase): span1.tail = markdown.util.AtomicString(u' *with*') new = self.inlineprocessor.run(tree) self.assertEqual(markdown.searializers.to_html_string(new), - '<div><p>*some* <span>*more* <span>*text* <span>*here*</span> *to*</span> *test*</span> *with*</p></div>') + '<div><p>*some* <span>*more* <span>*text* <span>*here*</span> ' + '*to*</span> *test*</span> *with*</p></div>') |