Is there any way to delay the evaluation of a Mock side_effect.
def mockfunc(wheel):
wheel.rubber = soft
wheel.make = Mock(side_effect=mockfunc(wheel)))
The problem here is that I'm trying to replace the 'wheel.make' method such that when it is called under test, mockfunc is instead called and one of the wheel attributes is set instead of running the usual method.
Thing is - when I set the side_effect, the mockfunc call happens immediately, The rubber attribute is set to soft. I don't want this to happen until the method wheel.make is called.