I will argue that this is a back practice when it comes to mock members of an object. the problem here is that if there is an exception within the body of the function that is doing the mocking, the original method will not be restored, and successive tests might break as a consequence of it.

normally, what I recommend here is to use the `setUp` and `tearDown` to store and restore the methods that might get mock in the individual tests, guaranteeing that each test will always get the right original method.