Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic

NMZivkovic/mock8.py

Created Mar 9, 2019
Embed
What would you like to do?
def test_reset_mock(self):
m = mock.Mock()
m.called_function.return_value = 11
m.called_function()
m.called_function()
m.called_function()
m.called_function.reset_mock();
self.assertEqual(m.called_function.call_count, 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment