mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 14:09:19 +00:00
refactor(test): make item wise inventory account deterministic
This commit is contained in:
@@ -273,7 +273,7 @@ class TestItemWiseInventoryAccount(ERPNextTestSuite):
|
|||||||
}
|
}
|
||||||
|
|
||||||
for row in items:
|
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()
|
inventory_account_dict = frappe._dict()
|
||||||
for item_name, item_data in items.items():
|
for item_name, item_data in items.items():
|
||||||
@@ -357,7 +357,7 @@ class TestItemWiseInventoryAccount(ERPNextTestSuite):
|
|||||||
}
|
}
|
||||||
|
|
||||||
for row in items:
|
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()
|
inventory_account_dict = frappe._dict()
|
||||||
for item_name, item_data in items.items():
|
for item_name, item_data in items.items():
|
||||||
@@ -451,7 +451,7 @@ class TestItemWiseInventoryAccount(ERPNextTestSuite):
|
|||||||
|
|
||||||
self.assertEqual(sle_value[0].value, gl_value, f"GL Entry not created for {item_code} correctly")
|
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):
|
if not frappe.db.exists("Item Group", item_name):
|
||||||
item_group = frappe.get_doc(
|
item_group = frappe.get_doc(
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user