From 7cf32131a2421e8328c1430c2c0d27f209cb66d6 Mon Sep 17 00:00:00 2001 From: chbndrhnns Date: Fri, 8 Sep 2023 18:22:58 +0200 Subject: [PATCH] Use List instead of list --- tests/test_pydantic_v1_models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_pydantic_v1_models.py b/tests/test_pydantic_v1_models.py index 36bbcf146..2728d9f15 100644 --- a/tests/test_pydantic_v1_models.py +++ b/tests/test_pydantic_v1_models.py @@ -1,4 +1,4 @@ -from typing import Optional +from typing import List, Optional import pytest from fastapi import Body, FastAPI @@ -54,12 +54,12 @@ async def response_model__invalid(): return 1 -@app.get("/response_model_list", response_model=list[Model]) +@app.get("/response_model_list", response_model=List[Model]) async def response_model_list(): return [Model(name="valid_model")] -@app.get("/response_model_list__invalid", response_model=list[Model]) +@app.get("/response_model_list__invalid", response_model=List[Model]) async def response_model_list__invalid(): return [1]