🐛(tests) change domain name factory to be more boring but reliable

MailDomain fixtures now use a boring non-repeating sequence. No
longer will the occasional random CI failure inject excitement
into our workdays; but fear not, there will remain other occasions
to enjoy the art of debugging.
This commit is contained in:
Laurent Bossavit
2025-03-04 16:09:48 +01:00
committed by Laurent Bossavit
parent 22419d4779
commit ae92ab5dd8

View File

@@ -26,7 +26,7 @@ class MailDomainFactory(factory.django.DjangoModelFactory):
django_get_or_create = ("name",)
skip_postgeneration_save = True
name = factory.Faker("domain_name")
name = factory.Sequence(lambda n: f"domain{n!s}.com")
slug = factory.LazyAttribute(lambda o: slugify(o.name))
support_email = factory.Faker("email")