Commit d61836cf authored by Yoshinori Okuji's avatar Yoshinori Okuji

Check that ids will not change.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38649 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 88cddb80
...@@ -1291,6 +1291,7 @@ class TestPropertySheet: ...@@ -1291,6 +1291,7 @@ class TestPropertySheet:
copy.setTitle('copy title') copy.setTitle('copy title')
self.assertEquals('obj title', obj.getTitle()) self.assertEquals('obj title', obj.getTitle())
self.assertEquals('copy title', copy.getTitle()) self.assertEquals('copy title', copy.getTitle())
self.assertEquals(obj.getId(), copy.getId())
# asContext method accepts parameters, and edit the copy with those # asContext method accepts parameters, and edit the copy with those
# parameters # parameters
...@@ -1300,6 +1301,7 @@ class TestPropertySheet: ...@@ -1300,6 +1301,7 @@ class TestPropertySheet:
self.assertTrue(copy.isTempObject(), '%r is not a temp object' % (copy,)) self.assertTrue(copy.isTempObject(), '%r is not a temp object' % (copy,))
self.assertEquals('obj title', obj.getTitle()) self.assertEquals('obj title', obj.getTitle())
self.assertEquals('copy title', copy.getTitle()) self.assertEquals('copy title', copy.getTitle())
self.assertEquals(obj.getId(), copy.getId())
# acquisition context is the same # acquisition context is the same
self.assertEquals(self.getPersonModule(), obj.getParentValue()) self.assertEquals(self.getPersonModule(), obj.getParentValue())
...@@ -1316,6 +1318,7 @@ class TestPropertySheet: ...@@ -1316,6 +1318,7 @@ class TestPropertySheet:
new_copy = obj.asContext() new_copy = obj.asContext()
self.assertTrue(new_copy.isTempObject(), self.assertTrue(new_copy.isTempObject(),
'%r is not a temp object' % (new_copy,)) '%r is not a temp object' % (new_copy,))
self.assertEquals(obj.getId(), new_copy.getId())
new_copy.edit(gender=gender.getCategoryRelativeUrl()) new_copy.edit(gender=gender.getCategoryRelativeUrl())
transaction.commit() transaction.commit()
self.tic() self.tic()
...@@ -1331,6 +1334,7 @@ class TestPropertySheet: ...@@ -1331,6 +1334,7 @@ class TestPropertySheet:
'%r is not a temp object' % (copy_of_category_tool,)) '%r is not a temp object' % (copy_of_category_tool,))
self.assertEquals(category_tool.getTitle(), original_title) self.assertEquals(category_tool.getTitle(), original_title)
self.assertEquals(copy_of_category_tool.getTitle(), copy_title) self.assertEquals(copy_of_category_tool.getTitle(), copy_title)
self.assertEquals(category_tool.getId(), copy_of_category_tool.getId())
def test_21_ActionCondition(self): def test_21_ActionCondition(self):
"""Tests action conditions """Tests action conditions
......
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