'Test creating group from source group
should throw NotImplementedError, is_group_a_cg_snapshot_type=False
otherwise returns list of volumes in \'available\' state'

@mock.patch('cinder.volume.utils.is_group_a_cg_snapshot_type')
def test_create_group_from_src_group(self, is_group_a_cg_snapshot_type):

    self.set_https_response_mode(self.RESPONSE_MODE.Valid)
    is_group_a_cg_snapshot_type.side_effect = [False, True]
    self.assertRaises(NotImplementedError, self.driver.create_group_from_src, self.ctx, self.group, self.volumes, source_group=self.group, source_vols=self.volumes)
    (result_model_update, result_volumes_model_update) = self.driver.create_group_from_src(self.ctx, self.group, self.volumes, source_group=self.group, source_vols=self.volumes)
    self.assertEqual(fields.GroupStatus.AVAILABLE, result_model_update['status'])
    get_pid = (lambda snapshot: snapshot['provider_id'])
    volume_provider_list = list(map(get_pid, result_volumes_model_update))
    self.assertListEqual(volume_provider_list, ['sid1', 'sid2'])
