Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5_fork
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
0
Merge Requests
0
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
Eteri
erp5_fork
Commits
38fe00ca
Commit
38fe00ca
authored
Feb 17, 2022
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testCMFActivity: Ignore extraneous activities in test_duplicateGroupedMessage.
parent
77b3f202
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
product/CMFActivity/tests/testCMFActivity.py
product/CMFActivity/tests/testCMFActivity.py
+17
-3
No files found.
product/CMFActivity/tests/testCMFActivity.py
View file @
38fe00ca
...
...
@@ -2339,10 +2339,24 @@ class TestCMFActivity(ERP5TypeTestCase, LogInterceptor):
obj
=
activity_tool
.
newActiveProcess
()
obj
.
reindexObject
(
activate_kw
=
{
'tag'
:
'foo'
,
'after_tag'
:
'bar'
})
self
.
commit
()
# Check that both messages were inserted.
# Also serves as a sanity check on indexation activities group_method_id.
indexation_group_metdod_id
=
'portal_catalog/catalogObjectList'
self
.
assertEqual
(
len
([
x
for
x
in
activity_tool
.
getMessageList
(
path
=
obj
.
getPath
())
if
x
.
activity_kw
.
get
(
'group_method_id'
)
==
indexation_group_metdod_id
]),
2
,
)
invoked
=
[]
def
invokeGroup
(
self
,
*
args
):
invoked
.
append
(
len
(
args
[
1
]))
return
ActivityTool_invokeGroup
(
self
,
*
args
)
def
invokeGroup
(
self
,
method_id
,
message_list
,
*
args
):
# Ignore any other activity which may be spawned from these catalog
# indexations (ex: fulltext indexations).
if
method_id
==
indexation_group_metdod_id
:
invoked
.
append
(
len
(
message_list
))
return
ActivityTool_invokeGroup
(
self
,
method_id
,
message_list
,
*
args
)
ActivityTool_invokeGroup
=
activity_tool
.
__class__
.
invokeGroup
try
:
activity_tool
.
__class__
.
invokeGroup
=
invokeGroup
...
...
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