'test delete_consistenygroup when CG is not empty'

def test_delete_consistencygroup_not_empty(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.cg_delete.side_effect = errors.CgNotEmptyError('bla', 'bla', ElementTree.Element('bla'))
    group_obj = self._create_test_group()
    ex = getattr(p, '_get_exception')()
    self.assertRaises(ex, p.delete_group, {}, group_obj, [])
