Commit e0999427 authored by Jérome Perrin's avatar Jérome Perrin

CodingStyleTestCase: create real documents for test_DuplicateActions

no need to create temp objects because anyway the transaction is aborted
at the end of each test.
This solve a problem that some APIs behave differently on temp objects
and we don't really have use cases where we use actions on temp objects.

For reference, the case which fail is an action with a TALES condition
using a related accessor, the exact condition was:

    python: object.getAggregateRelated(portal_type="Implicit Item Movement") is not None
parent c9be817b
...@@ -177,10 +177,8 @@ class CodingStyleTestCase(ERP5TypeTestCase): ...@@ -177,10 +177,8 @@ class CodingStyleTestCase(ERP5TypeTestCase):
document, content_portal_type_list = findContentChain( document, content_portal_type_list = findContentChain(
self.portal, portal_type) self.portal, portal_type)
for content_portal_type in content_portal_type_list: for content_portal_type in content_portal_type_list:
document = document.newContent( document = document.newContent(portal_type=content_portal_type)
portal_type=content_portal_type,
temp_object=True,
)
for action_category, action_list in self.portal.portal_actions.listFilteredActionsFor( for action_category, action_list in self.portal.portal_actions.listFilteredActionsFor(
document).iteritems(): document).iteritems():
# We ignore duplicate actions in action categories used by OfficeJS # We ignore duplicate actions in action categories used by OfficeJS
......
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