Commit 5c131f7f authored by Vincent Pelletier's avatar Vincent Pelletier

testTemplate: Test document (non-)indexation rather than activity presence.

Although these are synonyms here now, it may evolve in the future.
parent 1952d686
......@@ -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]
......
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