diff --git a/tests/test_xmltodict.py b/tests/test_xmltodict.py index 0455d96..04137f9 100644 --- a/tests/test_xmltodict.py +++ b/tests/test_xmltodict.py @@ -183,7 +183,8 @@ def test_namespace_support(self): xml = """ + xmlns:b="http://b.com/" + version="1.00"> 1 2 3 @@ -191,12 +192,13 @@ def test_namespace_support(self): """ d = { 'http://defaultns.com/:root': { + '@version': '1.00', + '@xmlns': { + '': 'http://defaultns.com/', + 'a': 'http://a.com/', + 'b': 'http://b.com/', + }, 'http://defaultns.com/:x': { - '@xmlns': { - '': 'http://defaultns.com/', - 'a': 'http://a.com/', - 'b': 'http://b.com/', - }, '@http://a.com/:attr': 'val', '#text': '1', }, @@ -211,7 +213,8 @@ def test_namespace_collapse(self): xml = """ + xmlns:b="http://b.com/" + version="1.00"> 1 2 3 @@ -223,12 +226,13 @@ def test_namespace_collapse(self): } d = { 'root': { + '@version': '1.00', + '@xmlns': { + '': 'http://defaultns.com/', + 'a': 'http://a.com/', + 'b': 'http://b.com/', + }, 'x': { - '@xmlns': { - '': 'http://defaultns.com/', - 'a': 'http://a.com/', - 'b': 'http://b.com/', - }, '@ns_a:attr': 'val', '#text': '1', }, @@ -243,7 +247,8 @@ def test_namespace_collapse_all(self): xml = """ + xmlns:b="http://b.com/" + version="1.00"> 1 2 3 @@ -252,12 +257,13 @@ def test_namespace_collapse_all(self): namespaces = collections.defaultdict(lambda: None) d = { 'root': { + '@version': '1.00', + '@xmlns': { + '': 'http://defaultns.com/', + 'a': 'http://a.com/', + 'b': 'http://b.com/', + }, 'x': { - '@xmlns': { - '': 'http://defaultns.com/', - 'a': 'http://a.com/', - 'b': 'http://b.com/', - }, '@attr': 'val', '#text': '1', }, @@ -272,7 +278,8 @@ def test_namespace_ignore(self): xml = """ + xmlns:b="http://b.com/" + version="1.00"> 1 2 3 @@ -283,6 +290,7 @@ def test_namespace_ignore(self): '@xmlns': 'http://defaultns.com/', '@xmlns:a': 'http://a.com/', '@xmlns:b': 'http://b.com/', + '@version': '1.00', 'x': '1', 'a:y': '2', 'b:z': '3',