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
Labels
Merge Requests
140
Merge Requests
140
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
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):
...
@@ -2339,10 +2339,24 @@ class TestCMFActivity(ERP5TypeTestCase, LogInterceptor):
obj
=
activity_tool
.
newActiveProcess
()
obj
=
activity_tool
.
newActiveProcess
()
obj
.
reindexObject
(
activate_kw
=
{
'tag'
:
'foo'
,
'after_tag'
:
'bar'
})
obj
.
reindexObject
(
activate_kw
=
{
'tag'
:
'foo'
,
'after_tag'
:
'bar'
})
self
.
commit
()
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
=
[]
invoked
=
[]
def
invokeGroup
(
self
,
*
args
):
def
invokeGroup
(
self
,
method_id
,
message_list
,
*
args
):
invoked
.
append
(
len
(
args
[
1
]))
# Ignore any other activity which may be spawned from these catalog
return
ActivityTool_invokeGroup
(
self
,
*
args
)
# 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
ActivityTool_invokeGroup
=
activity_tool
.
__class__
.
invokeGroup
try
:
try
:
activity_tool
.
__class__
.
invokeGroup
=
invokeGroup
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