daily pastebin goal
28%
SHARE
TWEET

Untitled

a guest Sep 25th, 2016 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class UserFactory(factory.django.DjangoModelFactory):
  2.     username = factory.Sequence(lambda n: 'user-{0}'.format(n))
  3.     email = factory.Sequence(lambda n: 'user-{0}@example.com'.format(n))
  4.     password = factory.PostGenerationMethodCall('set_password', 'password')
  5.  
  6.     class Meta:
  7.         model = 'users.User'
  8.         django_get_or_create = ('username', )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top