def test_convert_schema_object(
      self, converter, schema_def, expected_type, expected_attrs
  ):
    """Test conversion of individual schema objects with different input variations."""
    converted = converter._convert_schema_object(schema_def)

    # Check type if expected
    if expected_type:
      assert converted["type"] == expected_type

    # Check other expected attributes
    for key, value in expected_attrs.items():
      assert converted[key] == value
Test conversion of individual schema objects with different input variations.
tests/unittests/tools/google_api_tool/test_googleapi_to_openapi_converter.py