def validate_batch(ctx, param, value):
    if value != app.config['DEFAULT_BATCH'] and \
            value in Batch.objects.scalar('id'):
        raise click.BadParameter(
            'Batch with id {id} already exists'.format(id=value))
    else:
        return value
Report a failed assertion for the given test.
dataset/ETHPy150Open mrgambal/vulyk/vulyk/cli/batches.py/validate_batch--crossover with--dataset/ETHPy150Open twisted/twisted/twisted/trial/reporter.py/TestResult.addFailure