diff --git a/tests/unit/test_shortcuts.py b/tests/unit/test_shortcuts.py index 0dd18651..9a3f36c9 100644 --- a/tests/unit/test_shortcuts.py +++ b/tests/unit/test_shortcuts.py @@ -423,8 +423,7 @@ def test_request_response_error(self, mock_unmarshal, spec_v31): mock_unmarshal.return_value = ResultMock(error_to_raise=ValueError) with pytest.raises(ValueError): - with pytest.warns(DeprecationWarning): - unmarshal_response(request, response, spec=spec_v31) + unmarshal_response(request, response, spec=spec_v31) mock_unmarshal.assert_called_once_with(request, response) @@ -597,15 +596,13 @@ def test_spec_invalid(self, spec_invalid): request = mock.Mock(spec=Request) with pytest.raises(SpecError): - with pytest.warns(DeprecationWarning): - validate_request(request, spec=spec_invalid) + validate_request(request, spec=spec_invalid) def test_spec_not_detected(self, spec_v20): request = mock.Mock(spec=Request) with pytest.raises(SpecError): - with pytest.warns(DeprecationWarning): - validate_request(request, spec=spec_v20) + validate_request(request, spec=spec_v20) def test_request_type_invalid(self, spec_v31): request = mock.sentinel.request @@ -733,8 +730,7 @@ def test_webhook_request_validator_not_found(self, spec_v30): request = mock.Mock(spec=WebhookRequest) with pytest.raises(SpecError): - with pytest.warns(DeprecationWarning): - validate_request(request, spec=spec_v30) + validate_request(request, spec=spec_v30) @mock.patch( "openapi_core.validation.request.validators.V31WebhookRequestValidator." @@ -889,16 +885,14 @@ def test_spec_not_detected(self, spec_invalid): response = mock.Mock(spec=Response) with pytest.raises(SpecError): - with pytest.warns(DeprecationWarning): - validate_response(request, response, spec=spec_invalid) + validate_response(request, response, spec=spec_invalid) def test_spec_not_supported(self, spec_v20): request = mock.Mock(spec=Request) response = mock.Mock(spec=Response) with pytest.raises(SpecError): - with pytest.warns(DeprecationWarning): - validate_response(request, response, spec=spec_v20) + validate_response(request, response, spec=spec_v20) def test_request_type_invalid(self, spec_v31): request = mock.sentinel.request @@ -965,8 +959,7 @@ def test_webhook_response_validator_not_found(self, spec_v30): response = mock.Mock(spec=Response) with pytest.raises(SpecError): - with pytest.warns(DeprecationWarning): - validate_response(request, response, spec=spec_v30) + validate_response(request, response, spec=spec_v30) @mock.patch( "openapi_core.validation.response.validators.V31WebhookResponseValidator."