Commit 5d29d570 authored by Nicolas Dumazet's avatar Nicolas Dumazet

Marking test_manyTemplatesWithoutReindexation as expectedFailure, with a lengthy explanation


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35770 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 776b81e1
...@@ -33,6 +33,7 @@ import unittest ...@@ -33,6 +33,7 @@ import unittest
import transaction import transaction
from AccessControl.SecurityManagement import newSecurityManager from AccessControl.SecurityManagement import newSecurityManager
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.backportUnittest import expectedFailure
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5Form.Document.Preference import Priority from Products.ERP5Form.Document.Preference import Priority
...@@ -320,6 +321,17 @@ class TestTemplate(ERP5TypeTestCase): ...@@ -320,6 +321,17 @@ class TestTemplate(ERP5TypeTestCase):
self.assertEqual(len(preference.objectIds()), 1) self.assertEqual(len(preference.objectIds()), 1)
# Reason for test failure:
#
# Base_makeTemplateFromDocument uses portal_preference.getActivePreference(),
# and if the user has no preference, it creates a new preference to attach it
# the template.
# But getActivePreference uses the catalog, for performance reasons. Which
# means that two successive calls to Base_makeTemplateFromDocument, from an
# initial state where the user has no active preferences, will create wrongly
# two preferences instead of one: during the second call, a preference does
# exist, and is enabled for current user, but is just not yet reindexed.
@expectedFailure
def test_manyTemplatesWithoutReindexation(self): def test_manyTemplatesWithoutReindexation(self):
"""Check what happen when templates are created one by one without reindexation""" """Check what happen when templates are created one by one without reindexation"""
self.createUserAndLogin(self.id()) self.createUserAndLogin(self.id())
......
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