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