Commit 169259b4 authored by Łukasz Nowak's avatar Łukasz Nowak

- in default business process use builder on delivery business path

 - check that after confirming order packing list is built for default process
 - check that nothing is built after confirming order for different process


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28212 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e422d1a4
...@@ -180,7 +180,8 @@ class TestBPMEvaluationDefaultProcessMixin: ...@@ -180,7 +180,8 @@ class TestBPMEvaluationDefaultProcessMixin:
trade_phase = 'default/delivery', trade_phase = 'default/delivery',
deliverable = 1, deliverable = 1,
completed_state_list = ['delivered'], completed_state_list = ['delivered'],
frozen_state_list = ['stopped', 'delivered'] frozen_state_list = ['stopped', 'delivered'],
delivery_builder = 'portal_deliveries/bpm_sale_packing_list_builder',
) )
self.invoice_path = self.createBusinessPath(self.business_process, self.invoice_path = self.createBusinessPath(self.business_process,
...@@ -343,10 +344,41 @@ class TestPackingListDefaultProcess(TestPackingList, TestBPMEvaluationDefaultPro ...@@ -343,10 +344,41 @@ class TestPackingListDefaultProcess(TestPackingList, TestBPMEvaluationDefaultPro
pass pass
class TestInvoiceDefaultProcess(TestInvoice, TestBPMEvaluationDefaultProcessMixin): class TestInvoiceDefaultProcess(TestInvoice, TestBPMEvaluationDefaultProcessMixin):
pass def test_confirming(self):
self.order_line = self._createOrderLine(resource_value = self._createProduct(),
quantity = 10, price = 5)
self.stepTic()
self.order.confirm()
self.stepTic()
self._checkOrderBPMSimulation()
self.assertEqual(
1,
len(self.order.getCausalityRelatedList(
portal_type=self.packing_list_portal_type))
)
class TestOrderDifferentProcess(TestOrder, TestBPMEvaluationDifferentProcessMixin): class TestOrderDifferentProcess(TestOrder, TestBPMEvaluationDifferentProcessMixin):
pass def test_confirming(self):
# in current BPM configuration nothing shall be built
# as soon as test business process will be finished, it shall built proper
# delivery
self.order_line = self._createOrderLine(resource_value = self._createProduct(),
quantity = 10, price = 5)
self.stepTic()
self.order.confirm()
self.stepTic()
self._checkOrderBPMSimulation()
self.assertEqual(
1,
len(self.order.getCausalityRelatedList())
)
self.assertEqual(
'Applied Rule',
self.order.getCausalityRelatedValue().getPortalType()
)
class TestPackingListDifferentProcess(TestPackingList, TestBPMEvaluationDifferentProcessMixin): class TestPackingListDifferentProcess(TestPackingList, TestBPMEvaluationDifferentProcessMixin):
pass pass
......
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