From 452f388e6b09505854aa9ecd9c52ba9a270fc253 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com>
Date: Thu, 12 Aug 2010 13:17:00 +0000
Subject: [PATCH]  - test subcontent reindexing for Container as parent
 document

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

diff --git a/product/ERP5/tests/testPackingList.py b/product/ERP5/tests/testPackingList.py
index ee2953b75c..bfd660b48c 100644
--- a/product/ERP5/tests/testPackingList.py
+++ b/product/ERP5/tests/testPackingList.py
@@ -1747,6 +1747,21 @@ class TestPackingList(TestPackingListMixin, ERP5TypeTestCase) :
     self.assertEquals(int_index_result, [line_ccc, line_ddd, line_aaa,
       line_bbb])
 
+  def test_subcontent_reindexing_container_line_cell(self):
+    """Tests, that indexation of Packing List are propagated to subobjects
+    during reindxation, for Container, Container Line and Container Cell"""
+    packing_list = self.portal.getDefaultModule(
+        self.packing_list_portal_type).newContent(
+            portal_type=self.packing_list_portal_type)
+    container = packing_list.newContent(
+        portal_type=self.container_portal_type)
+    container_line = container.newContent(
+        portal_type=self.container_line_portal_type)
+    container_cell = container_line.newContent(
+        portal_type=self.container_cell_portal_type)
+    self._testSubContentReindexing(container, [container_line,
+      container_cell])
+
 class TestSolvingPackingList(TestPackingListMixin, ERP5TypeTestCase):
   quiet = 0
 
@@ -1928,10 +1943,15 @@ class TestPurchasePackingListMixin(TestPackingListMixin):
   stepCheckPackingListIsNotPacked = ignored_step
   stepCheckPackingListIsPacked = ignored_step
   stepCheckNewPackingListIsPacked = ignored_step
+
   def test_subcontent_reindexing_packing_list_container_line_cell(self):
     """No need to check Containers in Purchase Packing List"""
     pass
 
+  def test_subcontent_reindexing_container_line_cell(self):
+    """No need to check Containers in Purchase Packing List"""
+    pass
+
 class TestPurchasePackingList(TestPurchasePackingListMixin, TestPackingList):
   """Tests for purchase packing list.
   """
-- 
2.30.9