From 2e6c675dd61027844eef7d9c81aa93ffb9b35767 Mon Sep 17 00:00:00 2001 From: Richard Mathot Date: Tue, 13 Jun 2017 15:11:39 +0200 Subject: [PATCH] [FIX] delivery: fix 824a7e86ed1c7fd9e4790bb6a93e1cda944637eb This test do not simply depend on company's currency; it also depends on installed pricelists and taxes... It is safer to run it after the installation of all these modules, else you can observe different result depending on the modules installation order. --- addons/delivery/tests/test_delivery_cost.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/delivery/tests/test_delivery_cost.py b/addons/delivery/tests/test_delivery_cost.py index a4c525789bf..0c8031f61a0 100644 --- a/addons/delivery/tests/test_delivery_cost.py +++ b/addons/delivery/tests/test_delivery_cost.py @@ -4,6 +4,8 @@ from odoo.tests import common from odoo.tools import float_compare +@common.at_install(False) +@common.post_install(True) class TestDeliveryCost(common.TransactionCase): def setUp(self): @@ -80,8 +82,8 @@ class TestDeliveryCost(common.TransactionCase): ('product_id', '=', self.sale_normal_delivery_charges.carrier_id.product_id.id)]) self.assertEqual(len(line), 1, "Delivery cost is not Added") - self.assertEqual(float_compare(line.price_subtotal, 10, precision_digits=2), 0, - "Delivey cost is not correspond.") + self.assertEqual(float_compare(line.price_subtotal, 10.0, precision_digits=2), 0, + "Delivery cost is not correspond.") # I confirm the sales order @@ -119,7 +121,7 @@ class TestDeliveryCost(common.TransactionCase): self.assertEqual(len(line), 1, "Delivery cost is not Added") self.assertEqual(float_compare(line.price_subtotal, 0, precision_digits=2), 0, - "Delivey cost is not correspond.") + "Delivery cost is not correspond.") # I set default delivery policy