diff --git a/setup.py b/setup.py index 1eee9c1e5..576a4bb21 100755 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ def read_version(package): ] swagger_ui_require = 'swagger-ui-bundle>=0.0.2' -flask_require = 'flask>=0.10.1' +flask_require = 'flask>=1.0.4' aiohttp_require = [ 'aiohttp>=2.3.10,<3.5.2', 'aiohttp-jinja2>=0.14.0' diff --git a/tests/decorators/test_security.py b/tests/decorators/test_security.py index f5323869d..bb4620d6c 100644 --- a/tests/decorators/test_security.py +++ b/tests/decorators/test_security.py @@ -64,14 +64,14 @@ def get_tokeninfo_response(*args, **kwargs): session.get = get_tokeninfo_response monkeypatch.setattr('connexion.decorators.security.session', session) - with pytest.raises(OAuthScopeProblem, message="Provided token doesn't have the required scope"): + with pytest.raises(OAuthScopeProblem, match="Provided token doesn't have the required scope"): wrapped_func(request, ['admin']) tokeninfo["scope"] += " admin" assert wrapped_func(request, ['admin']) is not None tokeninfo["scope"] = ["foo", "bar"] - with pytest.raises(OAuthScopeProblem, message="Provided token doesn't have the required scope"): + with pytest.raises(OAuthScopeProblem, match="Provided token doesn't have the required scope"): wrapped_func(request, ['admin']) tokeninfo["scope"].append("admin") @@ -102,14 +102,14 @@ def token_info(token): request = MagicMock() request.headers = {"Authorization": "Bearer 123"} - with pytest.raises(OAuthScopeProblem, message="Provided token doesn't have the required scope"): + with pytest.raises(OAuthScopeProblem, match="Provided token doesn't have the required scope"): wrapped_func(request, ['admin']) tokeninfo["scope"] += " admin" assert wrapped_func(request, ['admin']) is not None tokeninfo["scope"] = ["foo", "bar"] - with pytest.raises(OAuthScopeProblem, message="Provided token doesn't have the required scope"): + with pytest.raises(OAuthScopeProblem, match="Provided token doesn't have the required scope"): wrapped_func(request, ['admin']) tokeninfo["scope"].append("admin")