Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Factoryboy to populate database in tests #221

Open
numahell opened this issue Apr 18, 2020 · 0 comments
Open

Use Factoryboy to populate database in tests #221

numahell opened this issue Apr 18, 2020 · 0 comments

Comments

@numahell
Copy link
Contributor

Is your feature request related to a problem? Please describe.
utils and dev_populate.sh are useful, but they could be improved by using Factoryboy, a tool to generate python objects related to an ORM, and it works fine with Django.

Describe the solution you'd like
A file named factories.py located in petition app containing all models factories, and could be imported in tests to create test data, and used by django command, cli_pytition or whatever.
Fields values can be random, or following sequences, but can be overrided on initialization with more personal values.

Describe alternatives you've considered
Well it is just a nice to have, just a proposition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants