You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I did PR with FireoFactory and FireoAutoFactory. I hope it will be available soon :)
Please add likes to the PR if you want to see the changes in FactoryBoy sooner :)
Usage example:
fromfireoimportModelfromfactory_boy.fireoimportFireoAutoFactory, nullableclassComment(Model):
text=fields.TextField()
classUser(Model):
name=fields.TextField()
email=MyCustomEmailField()
comments=fields.ListField(Comment)
classUserFactory(FireoAutoFactory):
classMeta:
model=Userextra_mapping= {
MyCustomEmailField: lambdamaker, field: nullable(field, factory.Faker('email')),
}
model=UserFactory.create()
assertmodel.nameassertmodel.email# works for custom fields tooassertmodel.comments[0].text# works for nested models too
The text was updated successfully, but these errors were encountered:
ADR-007
changed the title
FactoryBoy factories are coming soon
FactoryBoy factories are coming soon!
Mar 3, 2023
I did PR with FireoFactory and FireoAutoFactory. I hope it will be available soon :)
Please add likes to the PR if you want to see the changes in FactoryBoy sooner :)
Usage example:
The text was updated successfully, but these errors were encountered: