From 5bee6ac1e949e3464e6ea8eaa199f743ccf29d70 Mon Sep 17 00:00:00 2001 From: yogishhg9964 Date: Wed, 30 Jul 2025 13:10:47 +0530 Subject: [PATCH] fix: Ensure Pydantic v1 compatibility in QUERY method tests - Replace model_dump() with direct model return for better compatibility - Follows existing FastAPI test patterns for Pydantic model handling - Maintains full functionality while supporting both Pydantic v1 and v2 --- tests/test_query_method.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_query_method.py b/tests/test_query_method.py index dd48e55d3..88d94894a 100644 --- a/tests/test_query_method.py +++ b/tests/test_query_method.py @@ -190,7 +190,7 @@ def test_query_method_with_path_parameters(): @app.query("/items/{item_id}") def query_item(item_id: int, filters: QueryFilter): - return {"item_id": item_id, "filters": filters.model_dump()} + return {"item_id": item_id, "filters": filters} client = TestClient(app) response = client.request(