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 asottile
Recipients asottile
Date 2016-04-06.21:17:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1459977471.57.0.92007997296.issue26704@psf.upfronthosting.co.za>
In-reply-to
Content
The root cause seems to be that autospecced functions return a function object (not a Mock instance) which a '.mock' attribute which is a MagicMock ( assigned here: https://github.com/python/cpython/blob/ae775ab1eb72f42de2d070158bade4bf261ac04f/Lib/unittest/mock.py#L198 )

I took a first stab at a patch (attached)
History
Date User Action Args
2016-04-06 21:17:51asottilesetrecipients: + asottile
2016-04-06 21:17:51asottilesetmessageid: <1459977471.57.0.92007997296.issue26704@psf.upfronthosting.co.za>
2016-04-06 21:17:51asottilelinkissue26704 messages
2016-04-06 21:17:51asottilecreate