From 330e14bc10c1101813649e962bd2dcd779223e35 Mon Sep 17 00:00:00 2001 From: Yurii Motov Date: Fri, 1 Aug 2025 11:14:31 +0200 Subject: [PATCH] Fix test --- tests/test_openapi_custom_schema_generator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_openapi_custom_schema_generator.py b/tests/test_openapi_custom_schema_generator.py index 62fb15399..b547992fc 100644 --- a/tests/test_openapi_custom_schema_generator.py +++ b/tests/test_openapi_custom_schema_generator.py @@ -1,6 +1,7 @@ import pytest from fastapi import FastAPI from fastapi._compat import PYDANTIC_V2, GenerateJsonSchema +from fastapi.openapi.constants import REF_TEMPLATE from fastapi.openapi.utils import get_openapi app = FastAPI() @@ -14,7 +15,7 @@ def read_root(): # Custom schema generator that does nothing but tracks if it was called class CustomJsonSchemaGenerator(GenerateJsonSchema): def __init__(self): - super().__init__() + super().__init__(ref_template=REF_TEMPLATE) self.called = False def generate_definitions(self, *args, **kwargs):