Skip to content

Use Factoryboy to populate database in tests #221

@numahell

Description

@numahell

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions