'Tests for correct operation when a volume type is specified by ID.
We wrap cinder.volume.api.API.manage_existing so that managing is not
actually attempted.'

@mock.patch('cinder.volume.api.API.manage_existing', api_manage)
@mock.patch('cinder.api.openstack.wsgi.Controller.validate_name_and_description')
def test_manage_volume_volume_type_by_uuid(self, mock_validate):

    body = {'volume': {'host': 'host_ok', 'ref': 'fake_ref', 'volume_type': fake.VOLUME_TYPE_ID, 'bootable': True}}
    res = self._get_resp_post(body)
    self.assertEqual(http_client.ACCEPTED, res.status_int)
    self.assertTrue(mock_validate.called)
