def validate_obama_primary_candidacy_2012():
    elec_id= 'md-2012-04-03-primary'
    kwargs = {
        'election_id': elec_id,
        'contest_slug': 'president-d',
        'slug': 'barack-obama',
    }
    try:
        cand = Candidate.objects.get(**kwargs)
        print "PASS: 1 obama primary candidacy found for 2012: %s" % "-".join(cand.key)
    except Candidate.DoesNotExist:
        raise Candidate.DoesNotExist("zero obama primary candidacies found for 2012")
    except Candidate.MultipleObjectsReturned as e:
        raise Candidate.MultipleObjectsReturned("multiple obama primary candidacies found for 2012: %s" %  e)


# Validators that are not specific to a particular election
If the source file is not readable, this is reported on standard
dataset/ETHPy150Open openelections/openelections-core/openelex/us/md/validate/__init__.py/validate_obama_primary_candidacy_2012--crossover with--dataset/ETHPy150Open patrys/PythonChecker/pyflakes/test/test_api.py/CheckTests.test_permissionDenied