From 94375bf95fe205fcc79d2438a300bac35672c1ea Mon Sep 17 00:00:00 2001 From: Kazuhiko Shiozaki <kazuhiko@nexedi.com> Date: Fri, 22 Jan 2010 10:43:49 +0000 Subject: [PATCH] we need more matching testers and divergence testers for invoice transaction rule. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31898 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/tests/testERP5Simulation.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/product/ERP5/tests/testERP5Simulation.py b/product/ERP5/tests/testERP5Simulation.py index 34a2138578..007019dd30 100644 --- a/product/ERP5/tests/testERP5Simulation.py +++ b/product/ERP5/tests/testERP5Simulation.py @@ -109,7 +109,9 @@ class TestERP5SimulationMixin(TestInvoiceMixin): destination_value=account_module[line_destination_id]) # matching provider for source and destination - for category in ('source', 'destination',): + for category in ('resource', 'source', 'destination', + 'destination_total_asset_price', + 'source_total_asset_price'): invoice_rule.newContent( portal_type='Category Membership Divergence Tester', title='%s divergence tester' % category, @@ -119,11 +121,20 @@ class TestERP5SimulationMixin(TestInvoiceMixin): # matching provider for quantity (i.e. only used for expand) invoice_rule.newContent( portal_type='Net Converted Quantity Divergence Tester', - title='%s divergence tester' % category, + title='quantity divergence tester', tested_property='quantity', quantity=0, divergence_provider=False, matching_provider=True) + # divergence provider for date + for property_id in ('start_date', 'stop_date'): + invoice_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) invoice_rule.validate() transaction.commit() self.tic() -- 2.30.9