Skip to content

Commit

Permalink
fix: Item Alternative Test
Browse files Browse the repository at this point in the history
  • Loading branch information
marination committed May 2, 2022
1 parent 5bc5af1 commit 964de1f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions erpnext/stock/doctype/item_alternative/test_item_alternative.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
from erpnext.manufacturing.doctype.work_order.test_work_order import make_wo_order_test_record
from erpnext.manufacturing.doctype.work_order.work_order import make_stock_entry
from erpnext.stock.doctype.item.test_item import create_item
from erpnext.stock.doctype.stock_reconciliation.stock_reconciliation import (
EmptyStockReconciliationItemsError,
)
from erpnext.stock.doctype.stock_reconciliation.test_stock_reconciliation import (
create_stock_reconciliation,
)
Expand Down Expand Up @@ -180,9 +183,12 @@ def make_items():
if not frappe.db.exists("Item", item_code):
create_item(item_code)

create_stock_reconciliation(
item_code="Test FG A RW 1", warehouse="_Test Warehouse - _TC", qty=10, rate=2000
)
try:
create_stock_reconciliation(
item_code="Test FG A RW 1", warehouse="_Test Warehouse - _TC", qty=10, rate=2000
)
except EmptyStockReconciliationItemsError:
pass

if frappe.db.exists("Item", "Test FG A RW 1"):
doc = frappe.get_doc("Item", "Test FG A RW 1")
Expand Down

0 comments on commit 964de1f

Please sign in to comment.