[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 <rep...@bugs.python.org>
wrote:

>
> Michael Foord added the comment:
>
> It should be perfectly valid to use attach_mock with an attribute that
> doesn't already exist. Part of it's purpose is to create new attributes.
>
> --
>
> ___
> Python tracker <rep...@bugs.python.org>
> <http://bugs.python.org/issue28569>
> ___
>

--

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



[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?

--

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



[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 <rep...@bugs.python.org>
<http://bugs.python.org/issue28569>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com