From a3d8bb8d21f61553765550ff71e73e43a358dd04 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Mon, 2 Feb 2026 19:15:08 +0530 Subject: [PATCH] refactor(test): make distributed discount deterministic --- erpnext/controllers/tests/test_distributed_discount.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/controllers/tests/test_distributed_discount.py b/erpnext/controllers/tests/test_distributed_discount.py index 83a4dc6f3dd..4f4911c8537 100644 --- a/erpnext/controllers/tests/test_distributed_discount.py +++ b/erpnext/controllers/tests/test_distributed_discount.py @@ -5,6 +5,7 @@ from erpnext.tests.utils import ERPNextTestSuite class TestTaxesAndTotals(AccountsTestMixin, ERPNextTestSuite): + @ERPNextTestSuite.change_settings("Selling Settings", {"allow_multiple_items": 1}) def test_distributed_discount_amount(self): so = make_sales_order(do_not_save=1) so.apply_discount_on = "Net Total" @@ -26,6 +27,7 @@ class TestTaxesAndTotals(AccountsTestMixin, ERPNextTestSuite): self.assertEqual(so.net_total, 1400) self.assertEqual(so.grand_total, 1400) + @ERPNextTestSuite.change_settings("Selling Settings", {"allow_multiple_items": 1}) def test_distributed_discount_amount_with_taxes(self): so = make_sales_order(do_not_save=1) so.apply_discount_on = "Grand Total"