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 Darragh Bailey
Recipients Darragh Bailey
Date 2015-11-10.17:02:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1447174958.96.0.448093662654.issue25597@psf.upfronthosting.co.za>
In-reply-to
Content
Both unittest.mock and the backported release for earlier pythons don't appear to support mocking of dictionary objects.

Specifically I'm expecting that any of the methods used to test for membership, or get items from a mock object wrapping a dictionary should succeed. However it appears that MagicMock doesn't appear to support this.

Attached file shows an attempt to use different methods with a wrapped dictionary object where only the '.get()' method appears to work as expected.
History
Date User Action Args
2015-11-10 17:02:38Darragh Baileysetrecipients: + Darragh Bailey
2015-11-10 17:02:38Darragh Baileysetmessageid: <1447174958.96.0.448093662654.issue25597@psf.upfronthosting.co.za>
2015-11-10 17:02:38Darragh Baileylinkissue25597 messages
2015-11-10 17:02:38Darragh Baileycreate