fix: added testcase

This commit is contained in:
Anupam 2021-11-02 12:39:13 +05:30
parent 264b0df9ff
commit 530a0f481e

View File

@ -14,6 +14,7 @@ from erpnext.manufacturing.doctype.work_order.work_order import (
StockOverProductionError,
make_stock_entry,
stop_unstop,
close_work_order,
)
from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order
from erpnext.stock.doctype.item.test_item import create_item, make_item
@ -800,6 +801,10 @@ class TestWorkOrder(unittest.TestCase):
if row.is_scrap_item:
self.assertEqual(row.qty, 1)
def test_close_work_order(self):
close_work_order(self.wo_order.name, "Stopped")
self.assertEqual(self.wo_order.status, "Closed")
def update_job_card(job_card):
job_card_doc = frappe.get_doc('Job Card', job_card)
job_card_doc.set('scrap_items', [