Doug Harris <dhar...@gmail.com> added the comment:

+1 on this documentation change.

@xtreak yes, patching the correct object has bit me a couple times.

The pattern that I work with the most is when mocking calls to external 
services and APIs. I want to test my code that, say, sends email or sends user 
information to a partner, but without actual HTTP calls. Whenever I add a new 
test that does this, I need to rethink exactly what the sequence of mocked 
objects, calls, and returns will be.

The HOWTO section of the official Python docs has nothing on unittest or mock. 
Perhaps something there... (makes note to think about drafting something).

----------
nosy: +dougharris

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43400>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to