def CreateMock(self, class_to_mock):
    """Create a new mock object.

    Args:
      # class_to_mock: the class to be mocked
      class_to_mock: class

    Returns:
      MockObject that can be used as the class_to_mock would be.
    """

    new_mock = MockObject(class_to_mock)
    self._mock_objects.append(new_mock)
    return new_mock
Create a new mock object.

    Args:
      # class_to_mock: the class to be mocked
      class_to_mock: class

    Returns:
      MockObject that can be used as the class_to_mock would be.
    
deps/protobuf/python/mox.py