11 lines
262 B
Python
11 lines
262 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))
|