From 95e2264dc5cacce6041d94ba731c5b15460b37ac Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Tue, 21 Jun 2011 07:42:55 -0400 Subject: Fixed a few failing API tests. ElementTree is only available from markdown.util.etree not markdown.etree. This may be a backward incompatable change for some extensions. --- tests/test_apis.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/test_apis.py b/tests/test_apis.py index 0de897a..042b1c1 100644 --- a/tests/test_apis.py +++ b/tests/test_apis.py @@ -43,18 +43,18 @@ class TestBlockParser(unittest.TestCase): def testParseChunk(self): """ Test BlockParser.parseChunk. """ - root = markdown.etree.Element("div") + root = markdown.util.etree.Element("div") text = 'foo' self.parser.parseChunk(root, text) - self.assertEqual(markdown.etree.tostring(root), "

foo

") + self.assertEqual(markdown.util.etree.tostring(root), "

foo

") def testParseDocument(self): """ Test BlockParser.parseDocument. """ lines = ['#foo', '', 'bar', '', ' baz'] tree = self.parser.parseDocument(lines) - self.assert_(isinstance(tree, markdown.etree.ElementTree)) - self.assert_(markdown.etree.iselement(tree.getroot())) - self.assertEqual(markdown.etree.tostring(tree.getroot()), + self.assert_(isinstance(tree, markdown.util.etree.ElementTree)) + self.assert_(markdown.util.etree.iselement(tree.getroot())) + self.assertEqual(markdown.util.etree.tostring(tree.getroot()), "

foo

bar

baz\n
") -- cgit v1.2.3