import factory import hashlib from .models import ExampleModel from django.db.models.signals import post_save @factory.django.mute_signals(post_save) class ExampleFactory(factory.django.DjangoModelFactory): class Meta: model = ExampleModel # Please refer to Factory boy documentation # https://factoryboy.readthedocs.io