def mk_label(name, organization=None, description=None, persisted=True): description = description or '{}-description'.format(name) label = Label(name=name, description=description) if organization is not None: label.organization = organization if persisted: label.save() return label
def labels(mocker): return [Label(id=x, name='label-%d' % x) for x in xrange(0, 25)]