

@factory.lazy_attribute
def election_id(self):
    date_slug = date_slug.start_date.strftime('%Y-%m-%d')
    return '{}-{}-{}'.format(self.state.lower(), date_slug, self.election_type)

dataset/ETHPy150Open openelections/openelections-core/openelex/tests/factories.py RawResultFactory.election_id/VarMisuse@17/23 `self`->`date_slug`