def test_integration_calendar_api(self, converter_with_patched_build):
    """Integration test using Calendar API specification."""
    # Create and run the converter
    openapi_spec = converter_with_patched_build.convert()

    # Verify conversion results
    assert openapi_spec["info"]["title"] == "Google Calendar API"
    assert (
        openapi_spec["servers"][0]["url"]
        == "https://www.googleapis.com/calendar/v3"
    )

    # Check security schemes
    security_schemes = openapi_spec["components"]["securitySchemes"]
    assert "oauth2" in security_schemes
    assert "apiKey" in security_schemes

    # Check schemas
    schemas = openapi_spec["components"]["schemas"]
    assert "Calendar" in schemas
    assert "Event" in schemas
    assert "EventDateTime" in schemas

    # Check paths
    paths = openapi_spec["paths"]
    assert "/calendars/{calendarId}" in paths
    assert "/calendars" in paths
    assert "/calendars/{calendarId}/events" in paths

    # Check method details
    get_events = paths["/calendars/{calendarId}/events"]["get"]
    assert get_events["operationId"] == "calendar.events.list"

    # Check parameter details
    param_dict = {p["name"]: p for p in get_events["parameters"]}
    assert "maxResults" in param_dict
    max_results = param_dict["maxResults"]
    assert max_results["in"] == "query"
    assert max_results["schema"]["type"] == "integer"
    assert max_results["schema"]["default"] == "250"
Integration test using Calendar API specification.
tests/unittests/tools/google_api_tool/test_googleapi_to_openapi_converter.py