Model Bakery: Smart fixtures for better tests
Model Bakery offers you a smart way to create fixtures for testing in Django.
With a simple and powerful API, you can create many objects with a single line of code.
Model Bakery is a rename of the legacy model_mommy’s project. This change was made to avoid reinforcing gender stereotypes in technology. You can read more about this subject here.
Documentation: https://model-bakery.readthedocs.io
Source code: https://github.com/model-bakers/model_bakery/
Key Features
Automatically generates test data for Django models
Provides sensible defaults for all field types
Supports custom field overrides and “recipes” for reusable patterns
Handles related models and complex relationships
Works with currently maintained versions of Python and Django
Installation
$ pip install model-bakery
Contributing to Model Bakery
As an open-source project, Model Bakery welcomes contributions of many forms:
Code patches
Documentation improvements
Bug reports
Take a look at our GitHub repo for instructions on how to set up your local environment.
Support
Feel free to open an issue for support, development ideas, or questions!
License
Model Bakery is licensed under the MIT License. See the LICENSE file for more information.