'Tests for Receive Workflow'

def test_inv002a_receive_items(self):

    user = 'admin'
    recv_data = [('send_ref', 'WB_TEST_000002a'), ('purchase_ref', 'PO_TEST_000002a'), ('site_id', 'Same    Warehouse    (Warehouse)'), ('type', 'Internal    Shipment'), ('from_site_id', 'Ainaro    Warehouse    (Warehouse)')]
    item_data = [[('item_id', 'Blankets', 'supply_widget'), ('item_pack_id', 'Piece'), ('quantity', '3')]]
    result = self.receive(user, recv_data)
    recv_id = self.recv_get_id(result)
    item_list = []
    for data in item_data:
        result = self.track_recv_item(user, recv_id, data)
        text = ('%s    %s' % (data[2][1], data[0][1]))
        item_list.append({'text': text, 'record': result['after'].records[0]})
    self.recv_shipment(user, recv_id, item_list)
