阅读背景:

使用python的mock patch.object来改变另一个方法中调用的方法的返回值

来源:互联网 

Is it possible to mock a return value of a function called within another function I am trying to test? I would like the mocked method (which will be called in many methods I'm testing) to returned my specified variables each time it is called. For example: Is it possible to mock a return value of a func




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: