'test create_cgsnapshot when CG does not exist'

def test_create_cgsnapshot_cg_not_exist(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()
    group_obj = self._create_test_group()
    cgsnap_group_obj = self._create_test_cgsnapshot(group_obj.id)
    p.ibm_storage_cli.cmd.cg_snapshots_create.side_effect = errors.CgDoesNotExistError('bla', 'bla', ElementTree.Element('bla'))
    ex = getattr(p, '_get_exception')()
    self.assertRaises(ex, p.create_group_snapshot, {}, cgsnap_group_obj, [])
