summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/purchase/tests/test_stockvaluation.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/purchase/tests/test_stockvaluation.py b/addons/purchase/tests/test_stockvaluation.py
index 09359417738..453e906d152 100644
--- a/addons/purchase/tests/test_stockvaluation.py
+++ b/addons/purchase/tests/test_stockvaluation.py
@@ -171,7 +171,7 @@ class TestStockValuation(TransactionCase):
# the unit price of the move is the unit price of the purchase order line converted in
# the company's currency
- self.assertEqual(move1.price_unit, price_unit_usd)
+ self.assertAlmostEqual(move1.price_unit, price_unit_usd, places=2)
# change the rate of the currency
self.env['res.currency.rate'].create({
@@ -187,7 +187,7 @@ class TestStockValuation(TransactionCase):
self.assertLess(price_unit_usd_new_rate, price_unit_usd)
# the unit price on the stock move is not directly updated
- self.assertEquals(move1.price_unit, price_unit_usd)
+ self.assertAlmostEqual(move1.price_unit, price_unit_usd, places=2)
# validate the receipt
res_dict = picking1.button_validate()
@@ -195,6 +195,6 @@ class TestStockValuation(TransactionCase):
wizard.process()
# the unit price of the stock move has been updated to the latest value
- self.assertEquals(move1.price_unit, price_unit_usd_new_rate)
+ self.assertAlmostEqual(move1.price_unit, price_unit_usd_new_rate, places=2)
self.assertAlmostEqual(self.product1.stock_value, price_unit_usd_new_rate * 10, delta=0.1)