Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5diff
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
erp5diff
Commits
0fdd241a
Commit
0fdd241a
authored
Aug 25, 2015
by
Kazuhiko
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test to check whether update of a part of repeated elements works.
parent
ac8d33af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
src/tests/erp5diff_test_suite.py
src/tests/erp5diff_test_suite.py
+33
-0
No files found.
src/tests/erp5diff_test_suite.py
View file @
0fdd241a
...
...
@@ -1184,6 +1184,39 @@ class TestERP5Diff(unittest.TestCase):
</xupdate:modifications>
"""
def
test_part_of_repeated_elements_updated
(
self
):
"""32. Update a part of repeated elements
"""
old_xml
=
"""<erp5>
<object portal_type="Text" gid="0123456789">
<base_data type="data">
<block_data>a</block_data>
<block_data>b</block_data>
<block_data>b</block_data>
<block_data>b</block_data>
<block_data>c</block_data>
</base_data>
</object>
</erp5>
"""
new_xml
=
"""<erp5>
<object portal_type="Text" gid="0123456789">
<base_data type="data">
<block_data>a</block_data>
<block_data>d</block_data>
<block_data>b</block_data>
<block_data>b</block_data>
<block_data>c</block_data>
</base_data>
</object>
</erp5>
"""
expected_result_string
=
"""<xupdate:modifications xmlns:xupdate="http://www.xmldb.org/xupdate" version="1.0">
<xupdate:update select="/erp5/object[@gid='0123456789']/base_data/block_data[2]">d</xupdate:update>
</xupdate:modifications>
"""
self
.
_assertERP5DiffWorks
(
old_xml
,
new_xml
,
expected_result_string
)
if
__name__
==
'__main__'
:
...
...
Jérome Perrin
@jerome
mentioned in commit
30e6d520
·
Sep 14, 2022
mentioned in commit
30e6d520
mentioned in commit 30e6d52023f24ea4bec9a2496f6a8a3a7f7df020
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment