Subj.
Right now (Factory Boy ver. 2.4.1.) with this code:
class ImageFactory(factory.django.DjangoModelFactory):
class Meta:
model = Image
image = factory.django.ImageField(width=1024, height=768)
image
will be None
at save time, so if the Image
model has save
overridden and its operates with the image
, it will fail. And thats exactly my case.
So - how to make image generated before save
call?