chore: return doc if item already exists for test

(cherry picked from commit e6b9e82b2f)
This commit is contained in:
ljain112
2025-07-12 13:07:52 +05:30
committed by Mergify
parent 567f7b4d71
commit 8f6cd40c7b

View File

@@ -38,6 +38,8 @@ class TestBatch(FrappeTestCase):
if not frappe.db.exists("Item", item_name):
return make_item(item_name, dict(has_batch_no=1, create_new_batch=1, is_stock_item=1))
return frappe.get_doc("Item", item_name)
def test_purchase_receipt(self, batch_qty=100):
"""Test automated batch creation from Purchase Receipt"""
self.make_batch_item("ITEM-BATCH-1")