Spaces:
Running
Running
Jeremiah Lowin commited on
Commit ·
df0a1cf
1
Parent(s): a4d699c
Update test_openapi_compatibility.py
Browse files
tests/server/openapi/test_openapi_compatibility.py
CHANGED
|
@@ -2,7 +2,6 @@ import json
|
|
| 2 |
|
| 3 |
import httpx
|
| 4 |
import pytest
|
| 5 |
-
from pydantic import ValidationError
|
| 6 |
from pydantic.networks import AnyUrl
|
| 7 |
|
| 8 |
from fastmcp import FastMCP
|
|
@@ -609,9 +608,10 @@ class TestOpenAPIVersionDifferences:
|
|
| 609 |
},
|
| 610 |
}
|
| 611 |
|
| 612 |
-
# This should
|
| 613 |
-
|
| 614 |
-
|
|
|
|
| 615 |
|
| 616 |
def test_openapi_30_edge_case_with_multiple_exclusive_constraints(self):
|
| 617 |
"""Test edge case with multiple exclusive constraints that might trigger validation issues."""
|
|
|
|
| 2 |
|
| 3 |
import httpx
|
| 4 |
import pytest
|
|
|
|
| 5 |
from pydantic.networks import AnyUrl
|
| 6 |
|
| 7 |
from fastmcp import FastMCP
|
|
|
|
| 608 |
},
|
| 609 |
}
|
| 610 |
|
| 611 |
+
# This should not raise a ValidationError (GitHub issue #1021 should be fixed)
|
| 612 |
+
routes = parse_openapi_to_http_routes(spec_with_defs)
|
| 613 |
+
assert len(routes) == 1
|
| 614 |
+
assert routes[0].operation_id == "createComplexLoan"
|
| 615 |
|
| 616 |
def test_openapi_30_edge_case_with_multiple_exclusive_constraints(self):
|
| 617 |
"""Test edge case with multiple exclusive constraints that might trigger validation issues."""
|