Skip to content

Commit 282d4f4

Browse files
moving additional tests
1 parent 83a7a26 commit 282d4f4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/functional/event_handler/_pydantic/test_openapi_shared_response_bleed.py renamed to tests/functional/event_handler/_pydantic/test_openapi_response_combined.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
"""Test for bug #7711: OpenAPI schema return types bleed across routes when reusing response dictionaries"""
2-
3-
from __future__ import annotations
1+
from typing import Dict, List
42

53
from pydantic import BaseModel
64

@@ -39,7 +37,7 @@ class Responses:
3937
STANDARD_ERRORS = {**NOT_FOUND, **VALIDATION_ERROR, **SERVER_ERROR}
4038

4139
@classmethod
42-
def combine(cls, *response_dicts: dict[int, OpenAPIResponse]) -> dict[int, OpenAPIResponse]:
40+
def combine(cls, *response_dicts: Dict[int, OpenAPIResponse]) -> Dict[int, OpenAPIResponse]:
4341
"""Combine multiple response dictionaries."""
4442
result = {}
4543
for response_dict in response_dicts:
@@ -62,7 +60,7 @@ def test_openapi_shared_response_no_bleed():
6260
tags=["Exams"],
6361
responses=Responses.combine(Responses.OK, Responses.STANDARD_ERRORS),
6462
)
65-
def list_exams() -> Response[list[ExamSummary]]:
63+
def list_exams() -> Response[List[ExamSummary]]:
6664
"""Lists all available exams."""
6765
return Response(
6866
status_code=200,

0 commit comments

Comments
 (0)