[issue28569] mock.attach_mock should work with any return value of patch()

2016-11-14 Thread Syed Suhail Ahmed
Syed Suhail Ahmed added the comment: But since autospec is set as True, then shouldnt attach_mock throw an exception when called with an attribute that doesn't exist? On Mon, Nov 14, 2016 at 5:12 PM, Michael Foord wrote: > > Michael Foord added the comment: > > It should be p

[issue28569] mock.attach_mock should work with any return value of patch()

2016-11-11 Thread Syed Suhail Ahmed
Syed Suhail Ahmed added the comment: So from what I have understood, manager.attach_mock must raise an Exception when it is called with a wrong attribute, since the patch is called with autospec=True and you cannot call a mock with non existing attributes.Is that correct

[issue28569] mock.attach_mock should work with any return value of patch()

2016-11-07 Thread Syed Suhail Ahmed
Syed Suhail Ahmed added the comment: I would like to work on this issue. -- nosy: +Syed Suhail Ahmed ___ Python tracker <http://bugs.python.org/issue28