fix: test cases

(cherry picked from commit 36f1e3572c)
This commit is contained in:
Mihir Kandoi
2026-01-30 19:16:39 +05:30
committed by Mergify
parent e7ace8e620
commit e74389f01c
2 changed files with 3 additions and 2 deletions

View File

@@ -934,7 +934,7 @@ class TestQuotation(IntegrationTestCase):
# item code same but description different
make_item("_Test Item 2", {"is_stock_item": 1})
quotation = make_quotation(qty=1, rate=100, do_not_submit=1)
quotation = make_quotation(qty=10, rate=100, do_not_submit=1)
# duplicate items
for qty in [1, 1, 2, 3]:
@@ -948,7 +948,7 @@ class TestQuotation(IntegrationTestCase):
sales_order.delivery_date = nowdate()
self.assertEqual(len(sales_order.items), 6)
self.assertEqual(sales_order.items[0].qty, 1)
self.assertEqual(sales_order.items[0].qty, 10)
self.assertEqual(sales_order.items[-1].qty, 5)
# Row 1: 10, Row 4: 1, Row 5: 1

View File

@@ -57,6 +57,7 @@ class TestSalesOrder(AccountsTestMixin, IntegrationTestCase):
frappe.db.rollback()
frappe.set_user("Administrator")
@IntegrationTestCase.change_settings("Selling Settings", {"allow_negative_rates_for_items": 1})
def test_sales_order_with_negative_rate(self):
"""
Test if negative rate is allowed in Sales Order via doc submission and update items