Add factories for users

This commit is contained in:
Adam Dobrawy 2015-10-18 13:58:41 +02:00
parent a7c2cf8f56
commit e1d76ea25e

View File

@ -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