Skip to content

Commit

Permalink
Add UserFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
brylie committed Jan 5, 2024
1 parent b14604f commit 37c0872
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions accounts/factories.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import factory

from .models import User


class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = User

username = factory.Sequence(lambda n: f"user{n}")
email = factory.Faker("email")

0 comments on commit 37c0872

Please sign in to comment.