def mock_api_resource(calendar_api_spec):
  """Fixture that provides a mock API resource with the test spec."""
  mock_resource = MagicMock()
  mock_resource._rootDesc = calendar_api_spec
  return mock_resource
Fixture that provides a mock API resource with the test spec.
tests/unittests/tools/google_api_tool/test_googleapi_to_openapi_converter.py