Exemple #1
0
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
Exemple #2
0
def labels(mocker):
    return [Label(id=x, name='label-%d' % x) for x in xrange(0, 25)]