Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump flask to be at least 1.0.4 #995

Merged
merged 2 commits into from
Jul 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
8 changes: 4 additions & 4 deletions tests/decorators/test_security.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down