def test_parse_spec_with_multiple_methods(openapi_spec_generator):
  """Test parsing a spec with multiple HTTP methods for the same path."""
  openapi_spec = create_minimal_openapi_spec()
  openapi_spec["paths"]["/test"]["post"] = {
      "summary": "Test POST endpoint",
      "operationId": "testPost",
      "responses": {"200": {"description": "Successful response"}},
  }

  parsed_operations = openapi_spec_generator.parse(openapi_spec)
  operation_names = {op.name for op in parsed_operations}

  assert len(parsed_operations) == 2
  assert "test_get" in operation_names
  assert "test_post" in operation_names
Test parsing a spec with multiple HTTP methods for the same path.
tests/unittests/tools/openapi_tool/openapi_spec_parser/test_openapi_spec_parser.py