[TIP] Mocking the .decode(...) method on a string
ned at nedbatchelder.com
Wed Aug 29 07:13:46 PDT 2012
On 8/29/2012 10:02 AM, Alexander O'Donovan-Jones wrote:
> Creating a mock object that raises the exceptions required is exactly
> the route I'm taking now.
Yes, I can see that, but it's causing you trouble, and you can instead
simply use two arguments to the function that will raise the exception,
no? I'm not sure why mocking is the better approach here.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the testing-in-python