Commit c8e2a7bc authored by Łukasz Nowak's avatar Łukasz Nowak

- put common parts of rule configuration in common method


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28880 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent af46aeb1
...@@ -100,7 +100,7 @@ class TestBPMEvaluationMixin(TestBPMMixin): ...@@ -100,7 +100,7 @@ class TestBPMEvaluationMixin(TestBPMMixin):
'source_list', 'source_section_list', 'start_date', 'stop_date', 'source_list', 'source_section_list', 'start_date', 'stop_date',
'variation_category_list', 'variation_property_dict'), 'variation_category_list', 'variation_property_dict'),
matching_property = ('resource_list', 'variation_category_list', matching_property = ('resource_list', 'variation_category_list',
'variation_property_dict') 'variation_property_dict', 'order_list')
) )
edit_dict.update(**kw) edit_dict.update(**kw)
rule = self.rule_tool.newContent(**edit_dict) rule = self.rule_tool.newContent(**edit_dict)
...@@ -119,17 +119,13 @@ class TestBPMEvaluationMixin(TestBPMMixin): ...@@ -119,17 +119,13 @@ class TestBPMEvaluationMixin(TestBPMMixin):
def _createOrderRule(self): def _createOrderRule(self):
rule = self._createRootTradeRule(portal_type='Order Rule', rule = self._createRootTradeRule(portal_type='Order Rule',
reference='default_order_rule', matching_property = ('resource_list', reference='default_order_rule')
'variation_category_list', 'variation_property_dict', 'order_list'))
rule.validate() rule.validate()
transaction.commit() transaction.commit()
def _createDeliveryRule(self): def _createDeliveryRule(self):
rule = self._createRootTradeRule(portal_type='Delivery Rule', rule = self._createRootTradeRule(portal_type='Delivery Rule',
reference='default_delivery_rule', matching_property = ( reference='default_delivery_rule')
'resource_list', 'variation_category_list',
'variation_property_dict', 'order_list')
)
rule.validate() rule.validate()
transaction.commit() transaction.commit()
......
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