This makes tests using mocks easier to read, for example inside a test case:
self.assertEquals(my_mock.my_method.call_args,
(('goodbye',),{'hello': False}))
Can now be written as:
my_mock.my_method.assert_called_with('goodbye', hello=False)
Check it out!
No comments:
Post a Comment