[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) <vfe@odoo.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user