Message254453
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. |
|
Date |
User |
Action |
Args |
2015-11-10 17:02:38 | Darragh Bailey | set | recipients:
+ Darragh Bailey |
2015-11-10 17:02:38 | Darragh Bailey | set | messageid: <1447174958.96.0.448093662654.issue25597@psf.upfronthosting.co.za> |
2015-11-10 17:02:38 | Darragh Bailey | link | issue25597 messages |
2015-11-10 17:02:38 | Darragh Bailey | create | |
|