Mario Corchero added the comment:
Right, I believe this is indeed broken.
This code:
```
class A:
def m(self, a=None): pass
from unittest import mock
with mock.patch.object(A, "m", autospec=True):
A.m.side_effect = print
A().m(1)
```
prints: <__main__.A object at 0x7f69cc7dc6a0>
New submission from Pierre Ossman :
unittest.mock.patch() as it currently works cannot properly mock a method as it
currently replaces it with something more mimicking a function. I.e. the
descriptor magic that includes "self" isn't properly set up.
In most cases this doesn't really matter, b