test: remove dependency on other tests

This commit is contained in:
Ankush Menat 2022-02-09 11:19:01 +05:30
parent 6a8b7eeffe
commit d2cc5f2482

View File

@ -201,18 +201,20 @@ class TestWorkOrder(ERPNextTestCase):
self.assertEqual(cint(bin1_on_end_production.reserved_qty_for_production), self.assertEqual(cint(bin1_on_end_production.reserved_qty_for_production),
cint(bin1_on_start_production.reserved_qty_for_production)) cint(bin1_on_start_production.reserved_qty_for_production))
def test_reserved_qty_for_production(self): def test_reserved_qty_for_production_closed(self):
self.bin1_at_start = get_bin(self.item, self.warehouse)
self.bin1_at_start.update_reserved_qty_for_production() wo1 = make_wo_order_test_record(item="_Test FG Item", qty=2,
self.test_reserved_qty_for_production_submit()
self.test_reserved_qty_for_production_cancel()
self.test_close_work_order()
self.wo_order = make_wo_order_test_record(item="_Test FG Item", qty=2,
source_warehouse=self.warehouse) source_warehouse=self.warehouse)
self.bin1_on_submit = get_bin(self.item, self.warehouse) item = wo1.required_items[0].item_code
bin1_on_end_production = get_bin(self.item, self.warehouse) bin_before = get_bin(item, self.warehouse)
self.assertEqual(cint(bin1_on_end_production.reserved_qty_for_production), bin_before.update_reserved_qty_for_production()
cint(self.bin1_at_start.reserved_qty_for_production) + 2)
make_wo_order_test_record(item="_Test FG Item", qty=2,
source_warehouse=self.warehouse)
close_work_order(wo1.name, "Closed")
bin_after = get_bin(item, self.warehouse)
self.assertEqual(bin_before.reserved_qty_for_production, bin_after.reserved_qty_for_production)
def test_backflush_qty_for_overpduction_manufacture(self): def test_backflush_qty_for_overpduction_manufacture(self):
cancel_stock_entry = [] cancel_stock_entry = []