mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-26 19:44:00 +03:00
Added default password to UserFactory
This commit is contained in:
parent
e1d76ea25e
commit
88c6a1775b
|
@ -5,6 +5,8 @@ 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))
|
||||
password = factory.PosteGnerationMethodCall('set_password', 'password')
|
||||
|
||||
class Meta:
|
||||
model = models.User
|
||||
model = 'users.User'
|
||||
django_get_or_create = ('username', )
|
||||
|
|
Loading…
Reference in New Issue
Block a user