From 8c5322c1cb6659149fcd1db0e48f6cff1250d27f Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sun, 5 Mar 2023 19:04:46 +0530 Subject: [PATCH] fix(test): check for batch_no in returned dict --- erpnext/stock/doctype/batch/test_batch.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/batch/test_batch.py b/erpnext/stock/doctype/batch/test_batch.py index 998c8e35c79..44a17176dff 100644 --- a/erpnext/stock/doctype/batch/test_batch.py +++ b/erpnext/stock/doctype/batch/test_batch.py @@ -99,7 +99,8 @@ class TestBatch(FrappeTestCase): # shipped from FEFO batch self.assertEqual( - delivery_note.items[0].batch_no, get_batch_no(item_code, receipt.items[0].warehouse, batch_qty) + delivery_note.items[0].batch_no, + get_batch_no(item_code, receipt.items[0].warehouse, batch_qty).get("batch_no", None), ) def test_delivery_note_fail(self): @@ -145,7 +146,8 @@ class TestBatch(FrappeTestCase): # assert same batch is selected self.assertEqual( - stock_entry.items[0].batch_no, get_batch_no(item_code, receipt.items[0].warehouse, batch_qty) + stock_entry.items[0].batch_no, + get_batch_no(item_code, receipt.items[0].warehouse, batch_qty).get("batch_no", None), ) def test_batch_split(self):