'Test create volume
Create volume should raise an error
if there\'s no pool space left'

def test_create_volume_should_fail_if_no_pool_space(self):

    driver = mock.MagicMock()
    driver.VERSION = 'VERSION'
    p = self.proxy(self.default_storage_info, mock.MagicMock(), test_mock.cinder.exception, driver)
    p.ibm_storage_cli = mock.MagicMock()
    p.ibm_storage_cli.cmd.vol_create.side_effect = errors.PoolOutOfSpaceError('bla', 'bla', ElementTree.Element('bla'))
    volume = testutils.create_volume(self.ctxt, size=16, display_name='WTF32', volume_type_id='b3fcacb5-fbd8-4394-8c00-06853bc13929')
    ex = getattr(p, '_get_exception')()
    self.assertRaises(ex, p.create_volume, volume)
