From 0b7ef6ada2cf545147a5abe8807628d9bfd5c8db Mon Sep 17 00:00:00 2001
From: Vincent Pelletier <vincent@nexedi.com>
Date: Fri, 28 Dec 2007 15:34:10 +0000
Subject: [PATCH] Remove test_renameObjectsPreservesUid: it is not a required
 feature. What is costly in renaming an object is updating all relations
 pointing at (or traversing) renamed object. Updating the uid in category
 table is "just" a consequence from this, and will be done anyway - even if
 uid is the same.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18552 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/tests/testERP5Type.py | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/product/ERP5Type/tests/testERP5Type.py b/product/ERP5Type/tests/testERP5Type.py
index 6023881fd2..898698320c 100644
--- a/product/ERP5Type/tests/testERP5Type.py
+++ b/product/ERP5Type/tests/testERP5Type.py
@@ -1838,28 +1838,6 @@ class TestPropertySheet:
       self.assertRaises(ValueError, getattr, not_ok, 'attr')
       self.assertFalse(hasattr(not_ok, 'attr'))
 
-    def test_renameObjectsPreservesUid(self, quiet=quiet, run=run_all_test):
-      """Test that object renaming preserves original uid.
-         This features allows to avoid reindexing all related objects, as it
-         can be extremely costly.
-      """
-      if not run: return
-      folder = self.getOrganisationModule()
-      initial_id = 'foo'
-      final_id = 'bar'
-      folder.newContent(portal_type='Organisation', id=initial_id)
-      get_transaction().commit()
-      self.tic()
-      folder = self.getOrganisationModule()
-      document = folder[initial_id]
-      initial_uid = document.uid
-      folder.manage_renameObjects([initial_id], [final_id])
-      get_transaction().commit()
-      self.tic()
-      folder = self.getOrganisationModule()
-      document = folder[final_id]
-      self.assertEqual(initial_uid, document.uid)
-
     def test_renameObjectsReindexSubobjects(self, quiet=quiet, run=run_all_test):
       """Test that renaming an object with subobjects causes them to be
          reindexed (their path must be updated).
-- 
2.30.9