Author dougharris
Recipients docs@python, dougharris, eppeters, rhettinger, xtreak
Date 2021-03-04.17:53:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
+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).
Date User Action Args
2021-03-04 17:53:03dougharrissetrecipients: + dougharris, rhettinger, docs@python, xtreak, eppeters
2021-03-04 17:53:03dougharrissetmessageid: <>
2021-03-04 17:53:03dougharrislinkissue43400 messages
2021-03-04 17:53:03dougharriscreate