why are you mocking this  i think you should be mocking the instance update  method  or even just the save on the instance object  maybe you are still passing a sqlalchemy model to those methods when you should now be passing a novaobject and mocking  that  save 