mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-11 04:07:48 +03:00
Add factories for users
This commit is contained in:
parent
a7c2cf8f56
commit
e1d76ea25e
|
@ -0,0 +1,10 @@
|
||||||
|
from feder.users import models
|
||||||
|
import factory
|
||||||
|
|
||||||
|
|
||||||
|
class UserFactory(factory.django.DjangoModelFactory):
|
||||||
|
username = factory.Sequence(lambda n: 'user-{0}'.format(n))
|
||||||
|
email = factory.Sequence(lambda n: 'user-{0}@example.com'.format(n))
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
model = models.User
|
Loading…
Reference in New Issue
Block a user