Commit b08caed6 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

add several testers in delivery simulation rule so as to propagate changes on...

add several testers in delivery simulation rule so as to propagate changes on the parent simulation movement.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33473 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 62b3edde
......@@ -158,6 +158,66 @@ class TestBPMEvaluationMixin(TestBPMMixin):
reference='default_delivering_rule',
test_method_id = ('SimulationMovement_testDeliverySimulationRule',)
)
# matching providers
for category in ('resource',):
rule.newContent(
portal_type='Category Membership Divergence Tester',
title='%s divergence tester' % category,
tested_property=category,
divergence_provider=False,
matching_provider=True)
rule.newContent(
portal_type='Variation Divergence Tester',
title='variation divergence tester',
tested_property='variation_property_dict',
divergence_provider=False,
matching_provider=True)
# divergence providers
for category in ('resource',
'source_section',
'destination_section',
'source',
'source_function',
'destination_function',
'source_project',
'destination_project',
'aggregate',
'price_currency',
'base_contribution',
'base_application',
'source_account',
'destination_account',
):
rule.newContent(
portal_type='Category Membership Divergence Tester',
title='%s divergence tester' % category,
tested_property=category,
divergence_provider=True,
matching_provider=False)
rule.newContent(
portal_type='Net Converted Quantity Divergence Tester',
title='quantity divergence tester',
tested_property='quantity',
quantity=0,
divergence_provider=True,
matching_provider=False)
for property_id in ('start_date', 'stop_date'):
rule.newContent(
portal_type='DateTime Divergence Tester',
title='%s divergence tester' % property_id,
tested_property=property_id,
quantity=0,
divergence_provider=True,
matching_provider=False)
rule.newContent(
portal_type='Float Divergence Tester',
title='price divergence tester',
tested_property='price',
quantity=0,
divergence_provider=True,
matching_provider=False)
rule.validate()
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