[issue24651] Mock.assert* API is in user namespace

2015-07-28 Thread Kevin Benton
Kevin Benton added the comment: I like the idea of having the new module functions without deprecating the old ones. Then projects can encourage use of the API on their own terms. Maybe there could even be a global that projects could set that would disable the object methods

[issue24651] Mock.assert* API is in user namespace

2015-07-21 Thread Kevin Benton
Kevin Benton added the comment: What about other methods/properties like called, call_count, and reset_mock? It seems that they should be removed as well to be consistent with the reason for this change. -- nosy: +kevinbenton ___ Python tracker

[issue23078] unittest.mock patch autospec doesn't work on staticmethods

2014-12-18 Thread Kevin Benton
New submission from Kevin Benton: If one of the mock.patch methods is used with autospec=True on a staticmethod in an object, the mock library determines that it is not callable by checking for the __call__ attribute. This results in a NonCallableMagicMock being returned which of course dies