derwiki-adroll / mock

Automatically exported from code.google.com/p/mock
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Doc issue: MagicMock as dict example should reference patch.dict #158

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
There is an example of using MagicMock to mock a dictionary. It's still a good 
example of using the MagicMock magic method support, but it should at least 
mention patch.dict for working with dictionaries.

Also don't forget that create_autospec problem with instance attributes not 
being available can be ameliorated by attaching mocks as attributes to the 
created mocks (and will still be tracked in mock_calls).

Original issue reported on code.google.com by fuzzyman on 15 May 2012 at 3:02