阅读背景:

完全模仿Django测试的远程服务器和api

来源:互联网 

I have a thorny problem that I can't seem to get to grips with. I am currently writing unit tests for a django custom auth-backend. On our system we actually have two backends: one the built-in django backend and the custom backend that sends out requests to a Java based API that returns user info in the form of XML. Now, I am writing unit tests so I don't want to be sending requests outside the system like that, I'm not trying to test the Java API, so my question is how can I get around this and mock the side-effects in the most robust way.I have a thorny problem that I can't seem to ge




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

分享到: