def test_batch_split(self): '''Test batch splitting''' receipt = self.test_purchase_receipt() from erpnext.stock.doctype.batch.batch import split_batch new_batch = split_batch(receipt.items[0].batch_no, 'ITEM-BATCH-1', receipt.items[0].warehouse, 22) self.assertEqual(get_batch_qty(receipt.items[0].batch_no, receipt.items[0].warehouse), 78) self.assertEqual(get_batch_qty(new_batch, receipt.items[0].warehouse), 22)
def test_batch_split(self): '''Test batch splitting''' receipt = self.test_purchase_receipt() from erpnext.stock.doctype.batch.batch import split_batch new_batch = split_batch(receipt.items[0].batch_no, 'ITEM-BATCH-1', receipt.items[0].warehouse, 22) self.assertEquals(get_batch_qty(receipt.items[0].batch_no, receipt.items[0].warehouse), 78) self.assertEquals(get_batch_qty(new_batch, receipt.items[0].warehouse), 22)