From 737ff55b42aec15aa08f7472f53af9466ab00609 Mon Sep 17 00:00:00 2001 From: Andrey Epifancev Date: Sun, 8 Nov 2026 11:31:51 +0400 Subject: [PATCH] =?UTF-8?q?test(api):=20=D1=81=D1=85=D0=B5=D0=BC=D0=B0=20O?= =?UTF-8?q?penAPI=20=D1=81=D0=B2=D0=BE=D0=B4=D0=B0=202=20=D0=B4=D0=BE?= =?UTF-8?q?=D0=BF=D1=83=D1=81=D0=BA=D0=B0=D0=B5=D1=82=20Svod2PageResponse?= =?UTF-8?q?=20=D1=80=D1=8F=D0=B4=D0=BE=D0=BC=20=D1=81=20BaseListResponse?= =?UTF-8?q?=20(AURORA-1843)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Контрольный тест тяжёлых GET (AURORA-1848) требовал одну ссылку на BaseListResponse; режим страниц добавляет второй вариант ответа. Co-Authored-By: Claude Opus 5.5 --- api/tests/integration/test_heavy_get_json.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/tests/integration/test_heavy_get_json.py b/api/tests/integration/test_heavy_get_json.py index aa63a28..f8aa101 100644 --- a/api/tests/integration/test_heavy_get_json.py +++ b/api/tests/integration/test_heavy_get_json.py @@ -37,6 +37,7 @@ HEAVY_GET_PATHS = [ "/api/v1/projects/detail-summary", ] OPENAPI_REF = "#/components/schemas/BaseListResponse_SheetResponse_" +SVOD2_PATH = "/api/v1/svod/2/{sheet}/{year}" def _payload(rows) -> list[dict]: @@ -105,6 +106,12 @@ def test_openapi_heavy_get_schema_unchanged(): spec = app.openapi() for path in HEAVY_GET_PATHS: schema = spec["paths"][path]["get"]["responses"]["200"]["content"]["application/json"]["schema"] + if path == SVOD2_PATH: + # AURORA-1843: режим страниц (view/search/фильтры) отдаёт Svod2PageResponse с total, + # прежний режим - тот же BaseListResponse[SheetResponse]. + refs = [item["$ref"] for item in schema.get("anyOf", [])] + assert refs == ["#/components/schemas/Svod2PageResponse", OPENAPI_REF], path + continue assert schema == {"$ref": OPENAPI_REF}, path