Commit 3b5a50a3 authored by Vincent Pelletier's avatar Vincent Pelletier

testERP5Catalog: Make test_IndexationContextIndependence more realistic.

parent 657e6b7e
......@@ -48,6 +48,10 @@ class IndexableDocument(ObjectManager):
__allow_access_to_unprotected_subobjects__ = 1
isRADContent = 0
def __init__(self, path):
super(IndexableDocument, self).__init__()
self._path = path
def getUid(self):
uid = getattr(self, 'uid', None)
if uid is None:
......@@ -62,11 +66,17 @@ class IndexableDocument(ObjectManager):
raise AttributeError, name
def getPath(self):
return '' # Whatever
return self._path
def getRelativeUrl(self):
return '' # Whatever
def getRootDocumentPath(self):
return '' # Whatever
def SearchableText(self):
return '' # Whatever
class FooDocument(IndexableDocument):
def getReference(self):
return 'foo'
......@@ -3315,8 +3325,8 @@ VALUES
# Create some dummy documents
portal = self.getPortalObject()
portal.foo = FooDocument()
portal.bar = BarDocument()
portal.foo = FooDocument(portal.getPath() + '/foo')
portal.bar = BarDocument(portal.getPath() + '/bar')
# Get instances, wrapping them in acquisition context implicitely.
foo = portal.foo
......
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