From 5c131f7ff0aff2c71d1561929a753de6fa0e4895 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Mon, 12 Mar 2018 17:37:43 +0900 Subject: [PATCH] testTemplate: Test document (non-)indexation rather than activity presence. Although these are synonyms here now, it may evolve in the future. --- product/ERP5/tests/testTemplate.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/product/ERP5/tests/testTemplate.py b/product/ERP5/tests/testTemplate.py index c3a232451a..7b5685ab0c 100644 --- a/product/ERP5/tests/testTemplate.py +++ b/product/ERP5/tests/testTemplate.py @@ -346,15 +346,25 @@ class TestTemplate(ERP5TypeTestCase): preference.enable() self.tic() + self.assertEqual( + self.portal.portal_catalog( + path=preference.getPath() + '/%', + ).dictionaries(), + [], + ) document.Base_makeTemplateFromDocument(form_id=None) - - self.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() + # making a new template should not create index the new template nor any of + # its subobjects + self.assertEqual( + self.portal.portal_catalog( + path=preference.getPath() + '/%', + ).dictionaries(), + [], + ) + self.assertTrue(document.isIndexable) self.assertEqual(len(preference.objectIds()), 1) template = preference.objectValues()[0] -- 2.30.9