Re:Why I don't mock
by meric on Wednesday May 28, 2014 @09:46AM
(#7809840)
I'm guessing you mean like:
instead of:
But at some point you need to call that method somewhere else...
And `get_request_handler` still needs to be tested, which I 'stub' the API for getting the current time in the correct timezone within the test for the request. (Taking into account the other comment), using a library called 'mock'. (https://pypi.python.org/pypi/mock)
[ Parent
| on HN ]
There are no comments on this comment yet.