From c0ccddb8b2217fc1bfd1db7c1b4649fbccce6b61 Mon Sep 17 00:00:00 2001 From: Yurii Motov Date: Sun, 25 Jan 2026 17:58:50 +0100 Subject: [PATCH] Update test --- ...nput_output_schema_fals_with_nested_computed_field.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tests/test_separate_input_output_schema_fals_with_nested_computed_field.py b/tests/test_separate_input_output_schema_fals_with_nested_computed_field.py index 12014c1d48..cf033e40cd 100644 --- a/tests/test_separate_input_output_schema_fals_with_nested_computed_field.py +++ b/tests/test_separate_input_output_schema_fals_with_nested_computed_field.py @@ -1,12 +1,8 @@ -from typing import List - import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel -from .utils import needs_pydanticv2 - @pytest.fixture(name="client", params=[True, False]) def get_client(request: pytest.FixtureRequest): @@ -25,7 +21,7 @@ def get_client(request: pytest.FixtureRequest): app = FastAPI(separate_input_output_schemas=request.param) @app.get("/list") - def get_items() -> List[MyModel]: + def get_items() -> list[MyModel]: return [MyModel(id=1, name="Alice", age=30), MyModel(id=2, name="Bob", age=17)] @app.post("/item") @@ -35,7 +31,6 @@ def get_client(request: pytest.FixtureRequest): yield TestClient(app) -@needs_pydanticv2 def test_create_item(client: TestClient): response = client.post( "/item", @@ -45,7 +40,6 @@ def test_create_item(client: TestClient): assert response.json() == {"id": 1, "name": "Alice", "age": 30, "is_adult": True} -@needs_pydanticv2 def test_get_items(client: TestClient): response = client.get("/list") assert response.status_code == 200, response.text @@ -55,7 +49,6 @@ def test_get_items(client: TestClient): ] -@needs_pydanticv2 def test_openapi(client: TestClient): response = client.get("/openapi.json") openapi_schema = response.json()