[Twisted-Python] Which mocker tool for trial ?

Hi, I'm writing unitests with Trial for my app. I use Python Mocker (http://labix.org/mocker) for making stubs and mock. It work almost fine, but I have trouble mocking static methods. It seems that Mocker does'nt work with static methods called from a callback. Which tool are you using for mocking ? Thanks, Nicolas AGIUS

On 05:04 pm, nicolas.agius@lps-it.fr wrote:
If Python Mocker is failing to handle some case, it's somewhat likely that it's not a problem caused by Twisted or Trial, but a problem with Python Mocker or a problem with the way you're using it. Twisted is just a Python library, all of the normal Python rules still apply.
Which tool are you using for mocking ?
I typically avoid mocking as a testing approach, preferring verified fakes due to their reduced maintenance overhead and the fewer metaprogramming tricks required to have them work. Jean-Paul

We're using python-mockito and it works pretty good. I've also hacked it a bit so that it works with zope interfaces. See this post, which also contains a link to the bitbucket project: http://jrydberg.me/post/10519590583/strict-mocking-with-zope-interfaces On Feb 20, 2012, at 6:04 PM, Nicolas AGIUS wrote:
Which tool are you using for mocking ?

On 05:04 pm, nicolas.agius@lps-it.fr wrote:
If Python Mocker is failing to handle some case, it's somewhat likely that it's not a problem caused by Twisted or Trial, but a problem with Python Mocker or a problem with the way you're using it. Twisted is just a Python library, all of the normal Python rules still apply.
Which tool are you using for mocking ?
I typically avoid mocking as a testing approach, preferring verified fakes due to their reduced maintenance overhead and the fewer metaprogramming tricks required to have them work. Jean-Paul

We're using python-mockito and it works pretty good. I've also hacked it a bit so that it works with zope interfaces. See this post, which also contains a link to the bitbucket project: http://jrydberg.me/post/10519590583/strict-mocking-with-zope-interfaces On Feb 20, 2012, at 6:04 PM, Nicolas AGIUS wrote:
Which tool are you using for mocking ?
participants (3)
-
exarkun@twistedmatrix.com
-
Johan Rydberg
-
Nicolas AGIUS