Installation and Quick Start


Easiest is to install with pip:

pip install factory_djoy

Quick Start

Factory Djoy provides a UserFactory out of the box which will build valid instances of the default Django contrib auth User model.

from factory_djoy import UserFactory

user = UserFactory()

For any other Django models that you would like valid instances for, create your factory by inheriting from CleanModelFactory.

from factory_djoy import CleanModelFactory

from import Item

class ItemFactory(CleanModelFactory):
    class Meta:
        model = Item