ccdb-api/ccdb/users/tests/factories.py

11 lines
263 B
Python

from factory import DjangoModelFactory, Sequence
from ..models import User
class UserFactory(DjangoModelFactory):
class Meta:
model = User
name = Sequence(lambda n: 'user{}'.format(n))
username = Sequence(lambda n: 'username{}'.format(n))