From eb6602955a705e95e51bee943589e769426f3432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com> Date: Thu, 18 Jun 2009 14:42:01 +0000 Subject: [PATCH] - 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 --- product/ERP5/tests/testBPMCore.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/product/ERP5/tests/testBPMCore.py b/product/ERP5/tests/testBPMCore.py index e0f697bff1..dbe4151687 100644 --- a/product/ERP5/tests/testBPMCore.py +++ b/product/ERP5/tests/testBPMCore.py @@ -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') -- 2.30.9