From 5a402a570915d5c6e6100e1b6444b9536db2bf56 Mon Sep 17 00:00:00 2001 From: Devin Slauenwhite Date: Tue, 17 May 2022 13:32:26 -0400 Subject: [PATCH] fix(test): use unique item in sales order. --- erpnext/stock/doctype/delivery_note/test_delivery_note.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/delivery_note/test_delivery_note.py b/erpnext/stock/doctype/delivery_note/test_delivery_note.py index e55bdef7c9..c74b570fdc 100644 --- a/erpnext/stock/doctype/delivery_note/test_delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/test_delivery_note.py @@ -1071,10 +1071,13 @@ class TestDeliveryNote(FrappeTestCase): item = make_item() - so = make_sales_order(items=[{"item_code": item.name}]) + so = make_sales_order(item_code=item.name) soi = so.items[0] + # Make qty avl for test. + make_stock_entry(item_code=item.name, target=soi.warehouse, qty=10, basic_rate=100) + # Test that item qty has been reserved on submit of sales order. self.assertEqual(get_reserved_qty(soi.item_code, soi.warehouse), soi.qty)