From f3b6b4609e6fb52e6f5e706812b32dcd22ea3495 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 13 Jan 2023 01:33:46 +0530 Subject: [PATCH] chore: reuse doc object in test_pick_list_grouping_before_print (backport #33636) (#33638) chore: reuse doc object in test_pick_list_grouping_before_print (#33636) (cherry picked from commit e22d56484d7f4b8696bc48db2ac8dcc76e69e497) Co-authored-by: Ritwik Puri --- erpnext/stock/doctype/pick_list/test_pick_list.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/erpnext/stock/doctype/pick_list/test_pick_list.py b/erpnext/stock/doctype/pick_list/test_pick_list.py index 681e47b3df0..fbb9fb5f051 100644 --- a/erpnext/stock/doctype/pick_list/test_pick_list.py +++ b/erpnext/stock/doctype/pick_list/test_pick_list.py @@ -447,16 +447,7 @@ class TestPickList(FrappeTestCase): self.assertEqual(len(pl.locations), 4) # grouping should halve the number of items - pl = frappe.get_doc( - doctype="Pick List", - group_same_items=True, - locations=[ - _dict(item_code="A", warehouse="X", qty=5, picked_qty=1), - _dict(item_code="B", warehouse="Y", qty=4, picked_qty=2), - _dict(item_code="A", warehouse="X", qty=3, picked_qty=2), - _dict(item_code="B", warehouse="Y", qty=2, picked_qty=2), - ], - ) + pl.group_same_items = True pl.before_print() self.assertEqual(len(pl.locations), 2)