Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Vincent Bechu
erp5
Commits
3b5a50a3
Commit
3b5a50a3
authored
Sep 14, 2018
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testERP5Catalog: Make test_IndexationContextIndependence more realistic.
parent
657e6b7e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
product/ERP5Catalog/tests/testERP5Catalog.py
product/ERP5Catalog/tests/testERP5Catalog.py
+13
-3
No files found.
product/ERP5Catalog/tests/testERP5Catalog.py
View file @
3b5a50a3
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment