From 62e252c5f36d5614ef2240beb9539fb11fba0d5a Mon Sep 17 00:00:00 2001 From: "alexandre.fayolle@camptocamp.com" <> Date: Wed, 19 Feb 2014 09:51:41 +0100 Subject: [PATCH] added unit test for lp:1281687 bzr revid: alexandre.fayolle@camptocamp.com-20140219085141-s5wu6wqhzhbb53tk --- addons/mrp_repair/__openerp__.py | 3 ++- .../mrp_repair/test/test_mrp_repair_fee.yml | 23 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 addons/mrp_repair/test/test_mrp_repair_fee.yml diff --git a/addons/mrp_repair/__openerp__.py b/addons/mrp_repair/__openerp__.py index 26480e975ce..6f324c43f7a 100644 --- a/addons/mrp_repair/__openerp__.py +++ b/addons/mrp_repair/__openerp__.py @@ -56,7 +56,8 @@ The following topics should be covered by this module: 'test/test_mrp_repair_b4inv.yml', 'test/test_mrp_repair_afterinv.yml', 'test/test_mrp_repair_cancel.yml', - 'test/mrp_repair_report.yml' + 'test/mrp_repair_report.yml', + 'test/test_mrp_repair_fee.yml', ], 'installable': True, 'auto_install': False, diff --git a/addons/mrp_repair/test/test_mrp_repair_fee.yml b/addons/mrp_repair/test/test_mrp_repair_fee.yml new file mode 100644 index 00000000000..6aac605d0d9 --- /dev/null +++ b/addons/mrp_repair/test/test_mrp_repair_fee.yml @@ -0,0 +1,23 @@ +- + Testing total amount update function +- + I check the total amount of mrp_repair_rmrp1 is 100 +- + !assert {model: mrp.repair, id: mrp_repair_rmrp1, string=amount_total should be 100}: + - amount_total == 100 +- + I add a new fee line +- + !record {model: mrp.repair, id: mrp_repair_rmrp1}: + fees_lines: + - name: 'Assembly Service Cost' + product_id: product.product_assembly + product_uom_qty: 1.0 + product_uom: product.product_uom_hour + price_unit: 12.0 + to_invoice: True +- + I check the total amount of mrp_repair_rmrp1 is now 112 +- + !assert {model: mrp.repair, id: mrp_repair_rmrp1, string=amount_total should be 112}: + - amount_total == 112