Skip to content

Instantly share code, notes, and snippets.

@ProvoK
Last active March 10, 2018 15:34
Show Gist options
  • Save ProvoK/5abfea5a3b3868d3e045b01772d81b65 to your computer and use it in GitHub Desktop.
Save ProvoK/5abfea5a3b3868d3e045b01772d81b65 to your computer and use it in GitHub Desktop.
class UserModel(Base):
__tablename__ = 'account'
id = Column(BigInteger, primary_key=True)
name = Column(String, nullable=False)
email = Column(String, nullable=False)
class UserFactory(factory.alchemy.SQLAlchemyModelFactory):
id = factory.Sequence(lambda n: '%s' % n)
name = factory.Faker('name')
email = factory.Faker('email')
class Meta:
model = UserModel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment