'Restore the mock object to its initial state.'

def reset_mock(self):

    self.called = False
    self.call_args = None
    self.call_count = 0
    self.mock_calls = _CallList()
    self.call_args_list = _CallList()
    self.method_calls = _CallList()
    for child in self._mock_children.values():
        if isinstance(child, _SpecState):
            continue
        child.reset_mock()
    ret = self._mock_return_value
    if (_is_instance_mock(ret) and (ret is not self)):
        ret.reset_mock()
