From 61c191b92007a2ebc7380a83121ebf199e22edf7 Mon Sep 17 00:00:00 2001 From: Jeremiah Lowin <153965+jlowin@users.noreply.github.com> Date: Thu, 3 Jul 2025 21:09:27 -0400 Subject: [PATCH] Update test_openapi_compatibility.py --- tests/server/openapi/test_openapi_compatibility.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/server/openapi/test_openapi_compatibility.py b/tests/server/openapi/test_openapi_compatibility.py index ec717c562..a32630dd0 100644 --- a/tests/server/openapi/test_openapi_compatibility.py +++ b/tests/server/openapi/test_openapi_compatibility.py @@ -2,7 +2,6 @@ import json import httpx import pytest -from pydantic import ValidationError from pydantic.networks import AnyUrl from fastmcp import FastMCP @@ -609,9 +608,10 @@ class TestOpenAPIVersionDifferences: }, } - # This should reproduce the validation error from GitHub issue #1021 - with pytest.raises(ValidationError): - parse_openapi_to_http_routes(spec_with_defs) + # This should not raise a ValidationError (GitHub issue #1021 should be fixed) + routes = parse_openapi_to_http_routes(spec_with_defs) + assert len(routes) == 1 + assert routes[0].operation_id == "createComplexLoan" def test_openapi_30_edge_case_with_multiple_exclusive_constraints(self): """Test edge case with multiple exclusive constraints that might trigger validation issues."""