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"