summaryrefslogtreecommitdiff
path: root/tests.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2019-04-14 12:12:48 +0200
committerChristian Heimes <christian@python.org>2019-04-14 12:13:48 +0200
commit4ecaeda4d95abbec74de65728271e11b8ca3cda6 (patch)
tree486ed9ccefeefe210d6eb9ecfe9bf59be7e66630 /tests.py
parent34d0a1b58fa963b965cf98ff2970b3df54189ec3 (diff)
downloaddefusedxml-git-4ecaeda4d95abbec74de65728271e11b8ca3cda6.tar.gz
Fix XMLParse typo
The defusedxml.ElementTree and defusedxml.cElementTree modules had a typo and used XMLParse instead of XMLParser as an alias for DefusedXMLParser. Both the old and fixed name are now available. Signed-off-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'tests.py')
-rw-r--r--tests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests.py b/tests.py
index a769ac8..25429c2 100644
--- a/tests.py
+++ b/tests.py
@@ -200,6 +200,12 @@ class TestDefusedElementTree(BaseTests):
with self.assertRaises(TypeError):
ElementTree.XMLParse(html=1)
+ def test_aliases(self):
+ parser = self.module.DefusedXMLParser
+ assert self.module.XMLTreeBuilder is parser
+ assert self.module.XMLParser is parser
+ assert self.module.XMLParse is parser
+
class TestDefusedcElementTree(TestDefusedElementTree):
module = cElementTree