From fdcfbe6a710adad4cdc915b9515954c925056b05 Mon Sep 17 00:00:00 2001 From: ric-evans Date: Fri, 12 Apr 2024 11:17:25 -0500 Subject: [PATCH] fix imports --- tests/integrate_openapi/request_and_validate_test.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/integrate_openapi/request_and_validate_test.py b/tests/integrate_openapi/request_and_validate_test.py index 296bf948..0a5f517d 100644 --- a/tests/integrate_openapi/request_and_validate_test.py +++ b/tests/integrate_openapi/request_and_validate_test.py @@ -8,8 +8,8 @@ import requests import tornado from jsonschema_path import SchemaPath -from openapi_core.validation.response import exceptions - +from openapi_core.validation.response.exceptions import DataValidationError +from openapi_core.templating.responses.exceptions import ResponseNotFound from rest_tools.client import RestClient from rest_tools.client.utils import request_and_validate from rest_tools.server import RestServer, RestHandler @@ -149,21 +149,21 @@ async def test_010__invalid(server: Callable[[], RestClient]) -> None: # validate response data - with pytest.raises(exceptions.DataValidationError): + with pytest.raises(DataValidationError): await request_and_validate( rc, OPENAPI_SPEC, "POST", "/echo/this", {"echo": 123} ) - with pytest.raises(exceptions.DataValidationError): + with pytest.raises(DataValidationError): await request_and_validate( rc, OPENAPI_SPEC, "POST", "/echo/this", {"echo": {"foo": "string"}} ) - with pytest.raises(exceptions.DataValidationError): + with pytest.raises(DataValidationError): await request_and_validate(rc, OPENAPI_SPEC, "POST", "/echo/this", {"baz": 123}) # validate response error - with pytest.raises(exceptions.DataValidationError) as e: + with pytest.raises(ResponseNotFound) as e: await request_and_validate( rc, OPENAPI_SPEC,