diff --git a/poetry.lock b/poetry.lock index 77e2e7ff..1a260812 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1726,13 +1726,13 @@ plugins = ["importlib-metadata"] [[package]] name = "pytest" -version = "7.4.4" +version = "8.0.0" description = "pytest: simple powerful testing with Python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, - {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, + {file = "pytest-8.0.0-py3-none-any.whl", hash = "sha256:50fb9cbe836c3f20f0dfa99c565201fb75dc54c8d76373cd1bde06b06657bdb6"}, + {file = "pytest-8.0.0.tar.gz", hash = "sha256:249b1b0864530ba251b7438274c4d251c58d868edaaec8762893ad4a0d71c36c"}, ] [package.dependencies] @@ -1740,7 +1740,7 @@ colorama = {version = "*", markers = "sys_platform == \"win32\""} exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" -pluggy = ">=0.12,<2.0" +pluggy = ">=1.3.0,<2.0" tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} [package.extras] @@ -2553,4 +2553,4 @@ starlette = ["aioitertools", "starlette"] [metadata] lock-version = "2.0" python-versions = "^3.8.0" -content-hash = "a0c24b771433b05d6e5ee543c0529ecfeb361c871f974f2129a95c99df2326cb" +content-hash = "bc60e56dc04a6182fed8f33169ba4f0a41273de91796e43b17f420b92d0f59cb" diff --git a/pyproject.toml b/pyproject.toml index 186dfcf9..096287b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -95,7 +95,7 @@ falcon = ">=3.0" flask = "*" isort = "^5.11.5" pre-commit = "*" -pytest = "^7" +pytest = "^8" pytest-flake8 = "*" pytest-cov = "*" python-multipart = "*" diff --git a/tests/integration/test_petstore.py b/tests/integration/test_petstore.py index f00bbfbc..58fbb760 100644 --- a/tests/integration/test_petstore.py +++ b/tests/integration/test_petstore.py @@ -100,11 +100,15 @@ def test_get_pets(self, spec): with pytest.warns( DeprecationWarning, match="limit parameter is deprecated" ): - result = unmarshal_request( - request, - spec=spec, - cls=V30RequestParametersUnmarshaller, - ) + with pytest.warns( + DeprecationWarning, + match="Use of allowEmptyValue property is deprecated", + ): + result = unmarshal_request( + request, + spec=spec, + cls=V30RequestParametersUnmarshaller, + ) assert result.parameters == Parameters( query={ @@ -159,11 +163,15 @@ def test_get_pets_response(self, spec): with pytest.warns( DeprecationWarning, match="limit parameter is deprecated" ): - result = unmarshal_request( - request, - spec=spec, - cls=V30RequestParametersUnmarshaller, - ) + with pytest.warns( + DeprecationWarning, + match="Use of allowEmptyValue property is deprecated", + ): + result = unmarshal_request( + request, + spec=spec, + cls=V30RequestParametersUnmarshaller, + ) assert result.parameters == Parameters( query={ @@ -219,11 +227,15 @@ def test_get_pets_response_media_type(self, spec): with pytest.warns( DeprecationWarning, match="limit parameter is deprecated" ): - result = unmarshal_request( - request, - spec=spec, - cls=V30RequestParametersUnmarshaller, - ) + with pytest.warns( + DeprecationWarning, + match="Use of allowEmptyValue property is deprecated", + ): + result = unmarshal_request( + request, + spec=spec, + cls=V30RequestParametersUnmarshaller, + ) assert result.parameters == Parameters( query={ @@ -267,11 +279,15 @@ def test_get_pets_invalid_response(self, spec, response_unmarshaller): with pytest.warns( DeprecationWarning, match="limit parameter is deprecated" ): - result = unmarshal_request( - request, - spec=spec, - cls=V30RequestParametersUnmarshaller, - ) + with pytest.warns( + DeprecationWarning, + match="Use of allowEmptyValue property is deprecated", + ): + result = unmarshal_request( + request, + spec=spec, + cls=V30RequestParametersUnmarshaller, + ) assert result.parameters == Parameters( query={ @@ -339,11 +355,15 @@ def test_get_pets_ids_param(self, spec): with pytest.warns( DeprecationWarning, match="limit parameter is deprecated" ): - result = unmarshal_request( - request, - spec=spec, - cls=V30RequestParametersUnmarshaller, - ) + with pytest.warns( + DeprecationWarning, + match="Use of allowEmptyValue property is deprecated", + ): + result = unmarshal_request( + request, + spec=spec, + cls=V30RequestParametersUnmarshaller, + ) assert result.parameters == Parameters( query={ @@ -391,11 +411,15 @@ def test_get_pets_tags_param(self, spec): with pytest.warns( DeprecationWarning, match="limit parameter is deprecated" ): - result = unmarshal_request( - request, - spec=spec, - cls=V30RequestParametersUnmarshaller, - ) + with pytest.warns( + DeprecationWarning, + match="Use of allowEmptyValue property is deprecated", + ): + result = unmarshal_request( + request, + spec=spec, + cls=V30RequestParametersUnmarshaller, + ) assert result.parameters == Parameters( query={ @@ -443,12 +467,16 @@ def test_get_pets_parameter_schema_error(self, spec): with pytest.warns( DeprecationWarning, match="limit parameter is deprecated" ): - with pytest.raises(ParameterValidationError) as exc_info: - validate_request( - request, - spec=spec, - cls=V30RequestParametersUnmarshaller, - ) + with pytest.warns( + DeprecationWarning, + match="Use of allowEmptyValue property is deprecated", + ): + with pytest.raises(ParameterValidationError) as exc_info: + validate_request( + request, + spec=spec, + cls=V30RequestParametersUnmarshaller, + ) assert type(exc_info.value.__cause__) is InvalidSchemaValue result = unmarshal_request( @@ -475,12 +503,16 @@ def test_get_pets_wrong_parameter_type(self, spec): with pytest.warns( DeprecationWarning, match="limit parameter is deprecated" ): - with pytest.raises(ParameterValidationError) as exc_info: - validate_request( - request, - spec=spec, - cls=V30RequestParametersValidator, - ) + with pytest.warns( + DeprecationWarning, + match="Use of allowEmptyValue property is deprecated", + ): + with pytest.raises(ParameterValidationError) as exc_info: + validate_request( + request, + spec=spec, + cls=V30RequestParametersValidator, + ) assert type(exc_info.value.__cause__) is CastError result = unmarshal_request( @@ -502,12 +534,16 @@ def test_get_pets_raises_missing_required_param(self, spec): with pytest.warns( DeprecationWarning, match="limit parameter is deprecated" ): - with pytest.raises(MissingRequiredParameter): - validate_request( - request, - spec=spec, - cls=V30RequestParametersValidator, - ) + with pytest.warns( + DeprecationWarning, + match="Use of allowEmptyValue property is deprecated", + ): + with pytest.raises(MissingRequiredParameter): + validate_request( + request, + spec=spec, + cls=V30RequestParametersValidator, + ) result = unmarshal_request( request, spec=spec, cls=V30RequestBodyUnmarshaller @@ -534,12 +570,16 @@ def test_get_pets_empty_value(self, spec): with pytest.warns( DeprecationWarning, match="limit parameter is deprecated" ): - with pytest.raises(ParameterValidationError) as exc_info: - validate_request( - request, - spec=spec, - cls=V30RequestParametersValidator, - ) + with pytest.warns( + DeprecationWarning, + match="Use of allowEmptyValue property is deprecated", + ): + with pytest.raises(ParameterValidationError) as exc_info: + validate_request( + request, + spec=spec, + cls=V30RequestParametersValidator, + ) assert type(exc_info.value.__cause__) is EmptyQueryParameterValue result = unmarshal_request( @@ -567,11 +607,15 @@ def test_get_pets_allow_empty_value(self, spec): with pytest.warns( DeprecationWarning, match="limit parameter is deprecated" ): - result = unmarshal_request( - request, - spec=spec, - cls=V30RequestParametersUnmarshaller, - ) + with pytest.warns( + DeprecationWarning, + match="Use of allowEmptyValue property is deprecated", + ): + result = unmarshal_request( + request, + spec=spec, + cls=V30RequestParametersUnmarshaller, + ) assert result.parameters == Parameters( query={ @@ -605,11 +649,15 @@ def test_get_pets_none_value(self, spec): with pytest.warns( DeprecationWarning, match="limit parameter is deprecated" ): - result = unmarshal_request( - request, - spec=spec, - cls=V30RequestParametersUnmarshaller, - ) + with pytest.warns( + DeprecationWarning, + match="Use of allowEmptyValue property is deprecated", + ): + result = unmarshal_request( + request, + spec=spec, + cls=V30RequestParametersUnmarshaller, + ) assert result.parameters == Parameters( query={ @@ -644,11 +692,15 @@ def test_get_pets_param_order(self, spec): with pytest.warns( DeprecationWarning, match="limit parameter is deprecated" ): - result = unmarshal_request( - request, - spec=spec, - cls=V30RequestParametersUnmarshaller, - ) + with pytest.warns( + DeprecationWarning, + match="Use of allowEmptyValue property is deprecated", + ): + result = unmarshal_request( + request, + spec=spec, + cls=V30RequestParametersUnmarshaller, + ) assert result.parameters == Parameters( query={ @@ -688,11 +740,15 @@ def test_get_pets_param_coordinates(self, spec): with pytest.warns( DeprecationWarning, match="limit parameter is deprecated" ): - result = unmarshal_request( - request, - spec=spec, - cls=V30RequestParametersUnmarshaller, - ) + with pytest.warns( + DeprecationWarning, + match="Use of allowEmptyValue property is deprecated", + ): + result = unmarshal_request( + request, + spec=spec, + cls=V30RequestParametersUnmarshaller, + ) assert is_dataclass(result.parameters.query["coordinates"]) assert (