Commit abbe5302 authored by Julien Muchembled's avatar Julien Muchembled

Fix TestERP5Catalog.test_IndexationContextIndependence

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32349 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 043a5a00
......@@ -820,7 +820,7 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
Construct a dictionnary with a list of properties
to catalog into the table predicate
"""
if not getattr(object,'isPredicate',None):
if not object.providesIPredicate():
return None
object = object.asPredicate()
if object is None:
......
......@@ -53,12 +53,11 @@ except ImportError:
from OFS.ObjectManager import ObjectManager
from random import randint
dummy_callable = lambda: 0
class IndexableDocument(ObjectManager):
# this property is required for dummy providesIMovement
__allow_access_to_unprotected_subobjects__ = 1
isRADContent = 0
def getUid(self):
uid = getattr(self, 'uid', None)
......@@ -68,10 +67,9 @@ class IndexableDocument(ObjectManager):
def __getattr__(self, name):
# Case for all "is..." magic properties (isMovement, ...)
if name.startswith('is'):
return 0
if name.startswith('provides'):
return dummy_callable
if name.startswith('is') or \
name.startswith('provides'):
return lambda: 0
raise AttributeError, name
def getPath(self):
......
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