Restore the mock object to its initial state.
>>> mock = Mock(return_value=None) >>> mock('hello') >>> mock.called True >>> mock.reset_mock() >>> mock.called False
unittest.mock/Mock.reset_mock
Mock.reset_mock