This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author shmed
Recipients anfedorov, michael.foord, shmed
Date 2016-11-14.11:45:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAKn7tfx3AfgHvas2Rjw0RaLuHeiy=pT81g=i_=dAsAw5Nc0+Ow@mail.gmail.com>
In-reply-to <1479123751.36.0.528401916919.issue28569@psf.upfronthosting.co.za>
Content
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 <report@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 <report@bugs.python.org>
> <http://bugs.python.org/issue28569>
> _______________________________________
>
History
Date User Action Args
2016-11-14 11:45:00shmedsetrecipients: + shmed, michael.foord, anfedorov
2016-11-14 11:45:00shmedlinkissue28569 messages
2016-11-14 11:45:00shmedcreate