From ec419bf500ff71fc1cfbc62c92358b736d85e52e Mon Sep 17 00:00:00 2001
From: Yusei Tahara <yusei@nexedi.com>
Date: Thu, 7 Oct 2010 02:11:34 +0000
Subject: [PATCH] Set quantity to 1, otherwise applied rule is not made.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38941 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/tests/testBPMCore.py | 2 +-
 product/ERP5/tests/testRule.py    | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/product/ERP5/tests/testBPMCore.py b/product/ERP5/tests/testBPMCore.py
index d828a3b819..4b4c3c9a34 100644
--- a/product/ERP5/tests/testBPMCore.py
+++ b/product/ERP5/tests/testBPMCore.py
@@ -392,7 +392,7 @@ class TestBPMImplementation(TestBPMMixin):
 
     # mock order
     order = self.portal.sale_order_module.newContent(portal_type="Sale Order")
-    order_line = order.newContent(portal_type="Sale Order Line")
+    order_line = order.newContent(portal_type="Sale Order Line", quantity=1)
 
     # make simulation
     order.order()
diff --git a/product/ERP5/tests/testRule.py b/product/ERP5/tests/testRule.py
index 0599738852..2934a88727 100644
--- a/product/ERP5/tests/testRule.py
+++ b/product/ERP5/tests/testRule.py
@@ -92,7 +92,8 @@ class TestRuleMixin(TestOrderMixin):
         self.packing_list_portal_type)
     pl = pl_module.newContent(portal_type=self.packing_list_portal_type,
         source_section='group/a', destination_section='group/b')
-    pl.newContent(portal_type=self.packing_list_line_portal_type, id='line')
+    pl.newContent(portal_type=self.packing_list_line_portal_type, id='line',
+                  quantity=1)
     pl.setStartDate("2007-07-01")
     transaction.commit()
     self.tic()
-- 
2.30.9