阅读背景:

如何在测试中的另一个模块调用的模块中存根/模拟一个函数?

来源:互联网 

I am trying to test a function in module X. It is a fairly complex function. In this function, I import a function in Module Y that calls a third party service. How can I stub this 3rd party service in Module Y if my tests for module X don't import module Y?I am trying to test a function in module X. It




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

分享到: