Commit bc6d8c04 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

use a new simulation rule instead of a legacy one.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33429 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 21d1a31b
......@@ -41,7 +41,7 @@ from AccessControl.SecurityManagement import newSecurityManager
from DateTime import DateTime
from Testing import ZopeTestCase
from Products.ERP5Legacy.Document.OrderRule import OrderRule
from Products.ERP5.Document.OrderRootSimulationRule import OrderRootSimulationRule
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.utils import reindex
from Products.DCWorkflow.DCWorkflow import ValidationFailed
......@@ -123,9 +123,9 @@ class InventoryAPITestCase(ERP5TypeTestCase):
self.other_item = self.getItemModule().newContent(title='Other Item')
# create a dummy Rule, to be able to create simulation movements
rule_tool = self.portal.portal_rules
if not hasattr(rule_tool, 'default_order_rule'):
rule_tool._setObject('default_order_rule',
OrderRule('default_order_rule'))
if not hasattr(rule_tool, 'default_order_root_simulation_rule'):
rule_tool._setObject('default_order_root_simulation_rule',
OrderRootSimulationRule('default_order_root_simulation_rule'))
self.getInventory = self.getSimulationTool().getInventory
......
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