Skip to content

Commit

Permalink
enhancement: modify xml test cases to check namespace processing
Browse files Browse the repository at this point in the history
  • Loading branch information
ssato committed Feb 25, 2017
1 parent 9e45085 commit 7296319
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions anyconfig/backend/tests/xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,27 @@
</a>
"""

CNF_0 = {'config': {'@attrs': {'name': 'foo'},
'a': '0',
'b': {'@attrs': {'id': 'b0'}, '@text': 'bbb'},
'c': None,
'sect0': {'d': 'x, y, z'},
CNF_0 = {'config': {'@attrs': {'val:name': 'foo',
'xmlns': 'http://example.com/ns/cnf',
'xmlns:val': 'http://example.com/ns/cnf/val'},
'val:a': '0',
'val:b': {'@attrs': {'id': 'b0'}, '@text': 'bbb'},
'val:c': None,
'sect0': {'val:d': 'x, y, z'},
'list1': [{'item': '0'}, {'item': '1'}, {'item': '2'}],
'list2': {'@attrs': {'id': 'list2'},
'@children': [{'item': 'i'},
{'item': 'j'}]}}}
CNF_0_S = """\
<?xml version="1.0" encoding="UTF-8"?>
<config name='foo'>
<a>0</a>
<b id="b0">bbb</b>
<c/>
<config xmlns="http://example.com/ns/cnf"
xmlns:val="http://example.com/ns/cnf/val"
val:name='foo'>
<val:a>0</val:a>
<val:b id="b0">bbb</val:b>
<val:c/>
<sect0>
<d>x, y, z</d>
<val:d>x, y, z</val:d>
</sect0>
<list1>
<item>0</item>
Expand Down

0 comments on commit 7296319

Please sign in to comment.