Commit bf3d3747 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Remove duplicated test.

parent be253d62
...@@ -641,60 +641,12 @@ class TestERP5Diff(unittest.TestCase): ...@@ -641,60 +641,12 @@ class TestERP5Diff(unittest.TestCase):
<xupdate:remove select="/erp5/object[@id='313730']/workflow_action[@id='edit_workflow'][4]"/> <xupdate:remove select="/erp5/object[@id='313730']/workflow_action[@id='edit_workflow'][4]"/>
<xupdate:remove select="/erp5/object[@id='313730']/workflow_action[@id='edit_workflow'][8]"/> <xupdate:remove select="/erp5/object[@id='313730']/workflow_action[@id='edit_workflow'][8]"/>
</xupdate:modifications> </xupdate:modifications>
"""
self._assertERP5DiffWorks(old_xml, new_xml, expected_result_string)
def test_remove_element_with_same_id_bis(self):
"""21. Modify two elements that have same id
"""
old_xml = """
<erp5>
<object portal_type="Person" id="313730">
<workflow_action id="edit_workflow">
<time type="date">2009/08/28 19:12:34.424 GMT+9</time>
</workflow_action>
<workflow_action id="edit_workflow">
<time type="date">2009/08/28 19:12:34.432 GMT+9</time>
</workflow_action>
<workflow_action id="edit_workflow">
<time type="date">2009/08/28 19:12:34.434 GMT+9</time>
</workflow_action>
<workflow_action id="edit_workflow">
<time type="date">2009/08/28 19:12:34.436 GMT+9</time>
</workflow_action>
</object>
</erp5>
"""
new_xml = """
<erp5>
<object portal_type="Person" id="313730">
<workflow_action id="edit_workflow">
<time type="date">2009/08/28 19:12:34.424 GMT+9</time>
</workflow_action>
<workflow_action id="edit_workflow">
<time type="date">2009/08/29 19:12:34.432 GMT+9</time>
</workflow_action>
<workflow_action id="edit_workflow">
<time type="date">2009/08/30 19:12:34.434 GMT+9</time>
</workflow_action>
<workflow_action id="edit_workflow">
<time type="date">2009/08/31 19:12:34.436 GMT+9</time>
</workflow_action>
</object>
</erp5>
"""
expected_result_string = """<xupdate:modifications xmlns:xupdate="http://www.xmldb.org/xupdate" version="1.0">
<xupdate:update select="/erp5/object[@id='313730']/workflow_action[@id='edit_workflow'][2]/time">2009/08/29 19:12:34.432 GMT+9</xupdate:update>
<xupdate:update select="/erp5/object[@id='313730']/workflow_action[@id='edit_workflow'][3]/time">2009/08/30 19:12:34.434 GMT+9</xupdate:update>
<xupdate:update select="/erp5/object[@id='313730']/workflow_action[@id='edit_workflow'][4]/time">2009/08/31 19:12:34.436 GMT+9</xupdate:update>
</xupdate:modifications>
""" """
self._assertERP5DiffWorks(old_xml, new_xml, expected_result_string) self._assertERP5DiffWorks(old_xml, new_xml, expected_result_string)
def test_modify_attributes_of_sequential_objects(self): def test_modify_attributes_of_sequential_objects(self):
"""22. Modify attributes of sequencial objects """21. Modify attributes of sequencial objects
""" """
old_xml = """ old_xml = """
...@@ -732,7 +684,7 @@ class TestERP5Diff(unittest.TestCase): ...@@ -732,7 +684,7 @@ class TestERP5Diff(unittest.TestCase):
self._assertERP5DiffWorks(old_xml, new_xml, expected_result_string) self._assertERP5DiffWorks(old_xml, new_xml, expected_result_string)
def test_nodes_with_qnames(self): def test_nodes_with_qnames(self):
"""23. Modify nodes with Qualified Names """22. Modify nodes with Qualified Names
ERP5Diff should create xpath valid expression with correct prefix ERP5Diff should create xpath valid expression with correct prefix
""" """
old_xml = """ old_xml = """
...@@ -792,7 +744,7 @@ class TestERP5Diff(unittest.TestCase): ...@@ -792,7 +744,7 @@ class TestERP5Diff(unittest.TestCase):
self._assertERP5DiffWorks(old_xml, new_xml, expected_result_string) self._assertERP5DiffWorks(old_xml, new_xml, expected_result_string)
def test_attibutes_with_qnames(self): def test_attibutes_with_qnames(self):
"""24. Modify nodes with Qualified Names """23. Modify nodes with Qualified Names
Works on Attributes specially Works on Attributes specially
""" """
...@@ -818,7 +770,7 @@ class TestERP5Diff(unittest.TestCase): ...@@ -818,7 +770,7 @@ class TestERP5Diff(unittest.TestCase):
self._assertERP5DiffWorks(old_xml, new_xml, expected_result_string) self._assertERP5DiffWorks(old_xml, new_xml, expected_result_string)
def test_attibutes_with_qnames_at_root_level(self): def test_attibutes_with_qnames_at_root_level(self):
"""25. Modify nodes with Qualified Names at root level """24. Modify nodes with Qualified Names at root level
Work on Attributes specially Work on Attributes specially
""" """
old_xml = """ old_xml = """
...@@ -845,7 +797,7 @@ class TestERP5Diff(unittest.TestCase): ...@@ -845,7 +797,7 @@ class TestERP5Diff(unittest.TestCase):
self._assertERP5DiffWorks(old_xml, new_xml, expected_result_string) self._assertERP5DiffWorks(old_xml, new_xml, expected_result_string)
def test_reoder_nodes_to_the_end(self): def test_reoder_nodes_to_the_end(self):
"""26. Reorder some nodes to the end of list """25. Reorder some nodes to the end of list
""" """
old_xml = """ old_xml = """
<ul> <ul>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment