'Test batch splitting'

def test_batch_split(self):

    receipt = self.test_purchase_receipt()
    from erpnext.stock.doctype.batch.batch import split_batch
    new_batch = split_batch(receipt.items[0].batch_no, u'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)
