From 14acd8599e4792b2009d11f3106518d59dd76779 Mon Sep 17 00:00:00 2001 From: Victor Feyens Date: Mon, 31 Jul 2023 10:26:46 +0000 Subject: [PATCH] [FIX] website_sale: make test more reliable The test test_update_cart_zero_qty was checking the total amount of the cart, but depending on installed localizations, the taxes vary and the test can fail. This commit changes the check to the untaxed amount to make sure the test only depends on the sales price of the product defined in the test setup. closes odoo/odoo#130319 X-original-commit: a2c693795081953ed0ba07bfad210701fcf6f1f0 Signed-off-by: Victor Feyens (vfe) --- addons/website_sale/tests/test_website_sale_cart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_sale/tests/test_website_sale_cart.py b/addons/website_sale/tests/test_website_sale_cart.py index ff4b5670018..a89f2f91d26 100644 --- a/addons/website_sale/tests/test_website_sale_cart.py +++ b/addons/website_sale/tests/test_website_sale_cart.py @@ -97,7 +97,7 @@ class WebsiteSaleCart(TransactionCase): # add the product to the cart self.WebsiteSaleController.cart_update_json(product_id=product.id, add_qty=1) sale_order = website.sale_get_order() - self.assertEqual(sale_order.amount_total, 1150.0) + self.assertEqual(sale_order.amount_untaxed, 1000.0) # remove the product from the cart self.WebsiteSaleController.cart_update_json(product_id=product.id, line_id=sale_order.order_line.id, set_qty=0)