Last active
March 10, 2018 17:30
-
-
Save ProvoK/ee2e11f7d190508c9e6061587678ea01 to your computer and use it in GitHub Desktop.
Factory boy simple example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import factory | |
class User: | |
def __init__(self, name, email): | |
self.name = name | |
self.email = email | |
class UserFactory(factory.Factory): | |
name = factory.Faker('name') | |
email = factory.Faker('email') | |
class Meta: | |
model = User |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment