def reset_mock(self):
self.called = False<EOL>self.call_args = None<EOL>self.call_count = <NUM_LIT:0><EOL>self.mock_calls = _CallList()<EOL>self.call_args_list = _CallList()<EOL>self.method_calls = _CallList()<EOL>for child in self._mock_children.values():<EOL><INDENT>if isinstance(child, _SpecState):<EOL><INDENT>continue<EOL><DEDENT>child.reset_mock()<EOL><DEDENT>ret = self._mock_return_value<EOL>if _is_instance_mock(ret) and ret is not self:<EOL><INDENT>ret.reset_mock()<EOL><DEDENT>
Restore the mock object to its initial state.