From af91e0229c1c3549a6377fadcfc8b8b8bc0e3091 Mon Sep 17 00:00:00 2001
From: Nicolas Dumazet <nicolas.dumazet@nexedi.com>
Date: Tue, 25 May 2010 08:35:15 +0000
Subject: [PATCH] add an assertion to make sure that no useless reindexing
 activities are created when creating a Template

Failing for now; the code fixing it is on its way.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35606 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/tests/testTemplate.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/product/ERP5/tests/testTemplate.py b/product/ERP5/tests/testTemplate.py
index fd1b563b2d..352d68d9c0 100644
--- a/product/ERP5/tests/testTemplate.py
+++ b/product/ERP5/tests/testTemplate.py
@@ -369,8 +369,13 @@ class TestTemplate(ERP5TypeTestCase):
     self.tic()
 
     document.Base_makeTemplateFromDocument(form_id=None)
+
     transaction.commit()
+    # making a new template should not create indexing activities,
+    # either for the new template or one of its subobjects
+    self.assertEqual(self.portal.portal_activities.getMessageList(), [])
     self.tic()
+
     self.assertTrue(document.isIndexable)
     self.assertEqual(len(preference.objectIds()), 1)
     template = preference.objectValues()[0]
-- 
2.30.9