Commit eb660295 authored by Łukasz Nowak's avatar Łukasz Nowak

- check that business path category is more important that one on context


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27659 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f33d553f
......@@ -2410,6 +2410,21 @@ class TestBPMImplementation(TestBPMMixin):
self.assertEquals(source_node.getRelativeUrl(),
business_path.getSource(context=context_movement, default='something'))
def test_BuinessPathDynamicCategoryAccessProviderBusinessPathPrecedence(self):
movement_node = self.portal.organisation_module.newContent(
portal_type='Organisation')
path_node = self.portal.organisation_module.newContent(
portal_type='Organisation')
business_path = self.createBusinessPath()
business_path.setSourceMethodId('BusinessPath_getDefaultSourceList')
business_path.setSourceValue(path_node)
context_movement = self.createMovement()
context_movement.setSourceValue(movement_node)
self.assertEquals(path_node, business_path.getSourceValue())
self.assertEquals([path_node],
business_path.getSourceValueList(context=context_movement))
def test_BuinessPathDynamicCategoryAccessProviderEmptyMovement(self):
business_path = self.createBusinessPath()
business_path.setSourceMethodId('BusinessPath_getDefaultSourceList')
......
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