From 09fb8cb7cabf1fded988cbe6f07b4da497990784 Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Tue, 29 Dec 2009 09:32:37 +0000
Subject: [PATCH] override stepCheckPackingListLineWithDifferentResource to
 follow aggegation in expanding to simulation movements.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31512 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/tests/testERP5Simulation.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/product/ERP5/tests/testERP5Simulation.py b/product/ERP5/tests/testERP5Simulation.py
index 261b54bb37..2a3ad85298 100644
--- a/product/ERP5/tests/testERP5Simulation.py
+++ b/product/ERP5/tests/testERP5Simulation.py
@@ -543,6 +543,19 @@ class TestERP5SimulationPackingList(TestERP5SimulationMixin, TestPackingList):
                         simulation_line.getDeliveryError(),
                         self.default_quantity * 2)
 
+  def stepCheckPackingListLineWithDifferentResource(self,sequence=None, sequence_list=None, **kw):
+    """
+      Look if the packing list has new previsions
+    """
+    packing_list_line = sequence.get('packing_list_line')
+    new_resource = sequence.get('resource')
+    self.assertEquals(packing_list_line.getQuantity(), self.default_quantity*2)
+    self.assertEquals(packing_list_line.getResourceValue(), new_resource)
+    simulation_line_list = packing_list_line.getDeliveryRelatedValueList()
+    order_line_list = sum([x.getOrderList() for x in simulation_line_list], [])
+    self.assertEquals(sorted(packing_list_line.getCausalityList()),
+                      sorted(order_line_list))
+
 def test_suite():
   suite = unittest.TestSuite()
   suite.addTest(unittest.makeSuite(TestERP5Simulation))
-- 
2.30.9