From af4678bb1389cae7784b37fd9702ffe2d8d7a5e2 Mon Sep 17 00:00:00 2001 From: Pavel Tisnovsky Date: Sun, 7 Dec 2025 10:47:39 +0100 Subject: [PATCH 1/2] LCORE-1070: updated comments in test_openapi_json.py --- tests/integration/test_openapi_json.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/integration/test_openapi_json.py b/tests/integration/test_openapi_json.py index 3fa83fb2b..2085c7dd5 100644 --- a/tests/integration/test_openapi_json.py +++ b/tests/integration/test_openapi_json.py @@ -87,6 +87,17 @@ def _check_server_section_present(spec: dict[str, Any]) -> None: def _check_paths_and_responses_exist( spec: dict, path: str, method: str, expected_codes: set[str] ) -> None: + """Checks if the specified paths and responses exist in the API specification. + + Args: + spec (dict): The API specification. + path (str): The API endpoint path to check. + method (str): The HTTP method to check. + expected_codes (set[str]): The set of expected HTTP status codes. + + Raises: + AssertionError: If the path, method, or any of the expected response codes are missing. + """ paths = spec.get("paths") or {} assert path in paths, f"Missing path: {path}" op = (paths[path] or {}).get(method) From 8a834fc17b7b367ac859c2a3fecce57d8cbc1316 Mon Sep 17 00:00:00 2001 From: Pavel Tisnovsky Date: Sun, 7 Dec 2025 11:00:10 +0100 Subject: [PATCH 2/2] Fixed type hints --- tests/integration/test_openapi_json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/test_openapi_json.py b/tests/integration/test_openapi_json.py index 2085c7dd5..a102ccff4 100644 --- a/tests/integration/test_openapi_json.py +++ b/tests/integration/test_openapi_json.py @@ -85,7 +85,7 @@ def _check_server_section_present(spec: dict[str, Any]) -> None: def _check_paths_and_responses_exist( - spec: dict, path: str, method: str, expected_codes: set[str] + spec: dict[str, Any], path: str, method: str, expected_codes: set[str] ) -> None: """Checks if the specified paths and responses exist in the API specification.