refactor(test): make item wise inventory account deterministic

This commit is contained in:
ruthra kumar
2026-02-02 19:18:00 +05:30
parent c96f5e3d8c
commit a58ba3e7d4

View File

@@ -275,7 +275,7 @@ class TestItemWiseInventoryAccount(ERPNextTestSuite):
}
for row in items:
self.make_item_group(items[row]["item_group"])
self._make_item_group(items[row]["item_group"])
inventory_account_dict = frappe._dict()
for item_name, item_data in items.items():
@@ -359,7 +359,7 @@ class TestItemWiseInventoryAccount(ERPNextTestSuite):
}
for row in items:
self.make_item_group(items[row]["item_group"])
self._make_item_group(items[row]["item_group"])
inventory_account_dict = frappe._dict()
for item_name, item_data in items.items():
@@ -453,7 +453,7 @@ class TestItemWiseInventoryAccount(ERPNextTestSuite):
self.assertEqual(sle_value[0].value, gl_value, f"GL Entry not created for {item_code} correctly")
def make_item_group(self, item_name):
def _make_item_group(self, item_name):
if not frappe.db.exists("Item Group", item_name):
item_group = frappe.get_doc(
{