Skip to content

factories#

MetaxUserFactory#

Bases: DjangoModelFactory

Source code in src/apps/users/factories.py
class MetaxUserFactory(factory.django.DjangoModelFactory):
    class Meta:
        model = MetaxUser
        django_get_or_create = ("username",)

    email = factory.Sequence(lambda n: f"email@{n}.com")
    username = factory.Sequence(lambda n: f"test-user-{n}")
    id = factory.Faker("uuid4")