'Test getting batch quantities by batch_numbers, item_code or warehouse'

def test_get_batch_qty(self):

    self.make_batch_item(u'ITEM-BATCH-2')
    self.make_new_batch_and_entry(u'ITEM-BATCH-2', u'batch    a', u'_Test    Warehouse    -    _TC')
    self.make_new_batch_and_entry(u'ITEM-BATCH-2', u'batch    b', u'_Test    Warehouse    -    _TC')
    self.assertEquals(get_batch_qty(item_code=u'ITEM-BATCH-2', warehouse=u'_Test    Warehouse    -    _TC'), [{u'batch_no': u'batch    a', u'qty': 90.0}, {u'batch_no': u'batch    b', u'qty': 90.0}])
    self.assertEquals(get_batch_qty(u'batch    a', u'_Test    Warehouse    -    _TC'), 90)
