diff --git a/product/ERP5Type/tests/ERP5TypeTestCase.py b/product/ERP5Type/tests/ERP5TypeTestCase.py index 6d0239b0bcc646bb33f5150291754f42a52404fc..c7f101f1d6d2b410d3fa43904154edf219e5eb3a 100644 --- a/product/ERP5Type/tests/ERP5TypeTestCase.py +++ b/product/ERP5Type/tests/ERP5TypeTestCase.py @@ -1315,12 +1315,13 @@ def fortify(): ''' # check that we don't store persistent objects in cache from Products.ERP5Type.CachePlugins.BaseCache import CacheEntry - CacheEntry__init__ = CacheEntry.__init__ + CacheEntry.__original_init__ = CacheEntry.__init__ def __init__(self, value, *args, **kw): # this will raise TypeError if you try to cache a persistent object dumps(value) - CacheEntry__init__(self, value, *args, **kw) + return self.__original_init__(value, *args, **kw) CacheEntry.__init__ = __init__ + # randomize priorities of activities in a deterministic way seed = os.environ.get("random_activity_priority") if seed is not None: