Tweaked a factory to make duplicate list names less likely

- Legacy-Id: 14874
This commit is contained in:
Henrik Levkowetz 2018-03-20 14:15:57 +00:00
parent 327ffb6559
commit efb05a7f11

View file

@ -11,7 +11,7 @@ class ListFactory(factory.DjangoModelFactory):
class Meta: class Meta:
model = List model = List
name = factory.Faker('word') name = factory.Sequence(lambda n: "list-name-%s" % n)
description = factory.Faker('sentence', nb_words=10) description = factory.Faker('sentence', nb_words=10)
advertised = factory.LazyAttribute(lambda obj: random.randint(0, 1)) advertised = factory.LazyAttribute(lambda obj: random.randint(0, 1))