Added default password to UserFactory

This commit is contained in:
Adam Dobrawy 2015-11-12 05:51:15 +01:00
parent e1d76ea25e
commit 88c6a1775b

View File

@ -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', )