[Erp5-report] r18552 - /erp5/trunk/products/ERP5Type/tests/testERP5Type.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Dec 28 16:34:10 CET 2007
Author: vincent
Date: Fri Dec 28 16:34:10 2007
New Revision: 18552
URL: http://svn.erp5.org?rev=18552&view=rev
Log:
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.
Modified:
erp5/trunk/products/ERP5Type/tests/testERP5Type.py
Modified: erp5/trunk/products/ERP5Type/tests/testERP5Type.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/tests/testERP5Type.py?rev=18552&r1=18551&r2=18552&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/testERP5Type.py (original)
+++ erp5/trunk/products/ERP5Type/tests/testERP5Type.py Fri Dec 28 16:34:10 2007
@@ -1838,28 +1838,6 @@
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).
More information about the Erp5-report
mailing list