I want to find a way to properly test my code with Factory Boy.
There are a model, like this:
from django.db import models
class MyModel(models.Model):
param1 = <some field>
param1 = <some field>
param1 = <some field>
@property
def is_smth(self):
<some complicated code that returns boolean>
There is a factory for this model:
import factory
class MyModelFactory(factory.DjangoModelFactory):
param1 = <some value>
param2 = <some value>
param3 = <some value>
# And here i need to "rewrite" property of the model
# so that it would always return true
Can anyone help me with that? I didn't found mentions about this in factory boy's documentation, and various variants i've tried doesn't seem to work.