From 403494178746fba882208ee7e49f9dd6a2c6c5f6 Mon Sep 17 00:00:00 2001 From: SonnyBA Date: Fri, 29 Nov 2024 15:47:08 +0100 Subject: [PATCH] Move zgw-consumers-oas import to related function (#50) --- vng_api_common/tests/schema.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vng_api_common/tests/schema.py b/vng_api_common/tests/schema.py index 38138e4f..1e5e549f 100644 --- a/vng_api_common/tests/schema.py +++ b/vng_api_common/tests/schema.py @@ -6,7 +6,6 @@ import yaml from requests_mock import Mocker -from zgw_consumers_oas.schema_loading import read_schema DEFAULT_PATH_PARAMETERS = {"version": "1"} @@ -76,6 +75,8 @@ def get_validation_errors(response, field, index=0): def mock_service_oas_get( mock: Mocker, url: str, service: str, oas_url: str = "" ) -> None: + from zgw_consumers_oas.schema_loading import read_schema + if not oas_url: oas_url = f"{url}schema/openapi.yaml?v=3"