update python dependencies

This commit is contained in:
Sam 2022-09-19 14:05:22 +02:00
parent 6e04791b2d
commit 752224e6cd
4 changed files with 27 additions and 15 deletions

View File

@ -241,6 +241,17 @@ class ApiTestCaseMixin(OAuth2Mixin, RandomMixin):
error='invalid_client', error='invalid_client',
) )
@staticmethod
def assert_invalid_grant(
response: TestResponse, error_description: Optional[str] = None
) -> Dict:
return assert_oauth_errored_response(
response,
400,
error='invalid_grant',
error_description=error_description,
)
@staticmethod @staticmethod
def assert_invalid_request( def assert_invalid_request(
response: TestResponse, error_description: Optional[str] = None response: TestResponse, error_description: Optional[str] = None

View File

@ -554,7 +554,7 @@ class TestOAuthIssueAccessToken(OAuthIssueTokenTestCase):
headers=dict(content_type='multipart/form-data'), headers=dict(content_type='multipart/form-data'),
) )
self.assert_invalid_request(response) self.assert_invalid_grant(response)
def test_it_returns_error_when_grant_type_is_not_authorization_code( def test_it_returns_error_when_grant_type_is_not_authorization_code(
self, app: Flask, user_1: User self, app: Flask, user_1: User
@ -592,7 +592,7 @@ class TestOAuthIssueAccessToken(OAuthIssueTokenTestCase):
headers=dict(content_type='multipart/form-data'), headers=dict(content_type='multipart/form-data'),
) )
self.assert_invalid_request(response) self.assert_invalid_grant(response)
def test_it_returns_access_token(self, app: Flask, user_1: User) -> None: def test_it_returns_access_token(self, app: Flask, user_1: User) -> None:
oauth_client, code = self.create_authorized_oauth_client(app, user_1) oauth_client, code = self.create_authorized_oauth_client(app, user_1)

22
poetry.lock generated
View File

@ -58,7 +58,7 @@ tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>
[[package]] [[package]]
name = "authlib" name = "authlib"
version = "1.0.1" version = "1.1.0"
description = "The ultimate Python library in building OAuth and OpenID Connect servers and clients." description = "The ultimate Python library in building OAuth and OpenID Connect servers and clients."
category = "main" category = "main"
optional = false optional = false
@ -781,16 +781,16 @@ plugins = ["importlib-metadata"]
[[package]] [[package]]
name = "pyjwt" name = "pyjwt"
version = "2.4.0" version = "2.5.0"
description = "JSON Web Token implementation in Python" description = "JSON Web Token implementation in Python"
category = "main" category = "main"
optional = false optional = false
python-versions = ">=3.6" python-versions = ">=3.7"
[package.extras] [package.extras]
crypto = ["cryptography (>=3.3.1)"] crypto = ["cryptography (>=3.3.1)", "types-cryptography (>=3.3.21)"]
dev = ["sphinx", "sphinx-rtd-theme", "zope.interface", "cryptography (>=3.3.1)", "pytest (>=6.0.0,<7.0.0)", "coverage[toml] (==5.0.4)", "mypy", "pre-commit"] dev = ["sphinx (>=4.5.0,<5.0.0)", "sphinx-rtd-theme", "zope.interface", "cryptography (>=3.3.1)", "types-cryptography (>=3.3.21)", "pytest (>=6.0.0,<7.0.0)", "coverage[toml] (==5.0.4)", "pre-commit"]
docs = ["sphinx", "sphinx-rtd-theme", "zope.interface"] docs = ["sphinx (>=4.5.0,<5.0.0)", "sphinx-rtd-theme", "zope.interface"]
tests = ["pytest (>=6.0.0,<7.0.0)", "coverage[toml] (==5.0.4)"] tests = ["pytest (>=6.0.0,<7.0.0)", "coverage[toml] (==5.0.4)"]
[[package]] [[package]]
@ -1535,7 +1535,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-
[metadata] [metadata]
lock-version = "1.1" lock-version = "1.1"
python-versions = "^3.7" python-versions = "^3.7"
content-hash = "468ee5a0ea6984ed5f6a2a63ffa1de67a0d774bd6405ccefc00536a5ab7d8f42" content-hash = "461d79977e75199e5c9dfdd9a003f7d0060a01a3b06d6abbf275ca20fd3ab57d"
[metadata.files] [metadata.files]
alabaster = [ alabaster = [
@ -1553,8 +1553,8 @@ async-timeout = [
] ]
attrs = [] attrs = []
authlib = [ authlib = [
{file = "Authlib-1.0.1-py2.py3-none-any.whl", hash = "sha256:1286e2d5ef5bfe5a11cc2d0a0d1031f0393f6ce4d61f5121cfe87fa0054e98bd"}, {file = "Authlib-1.1.0-py2.py3-none-any.whl", hash = "sha256:be4b6a1dea51122336c210a6945b27a105b9ac572baffd15b07bcff4376c1523"},
{file = "Authlib-1.0.1.tar.gz", hash = "sha256:6e74a4846ac36dfc882b3cc2fbd3d9eb410a627f2f2dc11771276655345223b1"}, {file = "Authlib-1.1.0.tar.gz", hash = "sha256:0a270c91409fc2b7b0fbee6996e09f2ee3187358762111a9a4225c874b94e891"},
] ]
babel = [ babel = [
{file = "Babel-2.10.3-py3-none-any.whl", hash = "sha256:ff56f4892c1c4bf0d814575ea23471c230d544203c7748e8c68f0089478d48eb"}, {file = "Babel-2.10.3-py3-none-any.whl", hash = "sha256:ff56f4892c1c4bf0d814575ea23471c230d544203c7748e8c68f0089478d48eb"},
@ -2140,8 +2140,8 @@ pygments = [
{file = "Pygments-2.13.0.tar.gz", hash = "sha256:56a8508ae95f98e2b9bdf93a6be5ae3f7d8af858b43e02c5a2ff083726be40c1"}, {file = "Pygments-2.13.0.tar.gz", hash = "sha256:56a8508ae95f98e2b9bdf93a6be5ae3f7d8af858b43e02c5a2ff083726be40c1"},
] ]
pyjwt = [ pyjwt = [
{file = "PyJWT-2.4.0-py3-none-any.whl", hash = "sha256:72d1d253f32dbd4f5c88eaf1fdc62f3a19f676ccbadb9dbc5d07e951b2b26daf"}, {file = "PyJWT-2.5.0-py3-none-any.whl", hash = "sha256:8d82e7087868e94dd8d7d418e5088ce64f7daab4b36db654cbaedb46f9d1ca80"},
{file = "PyJWT-2.4.0.tar.gz", hash = "sha256:d42908208c699b3b973cbeb01a969ba6a96c821eefb1c5bfe4c390c01d67abba"}, {file = "PyJWT-2.5.0.tar.gz", hash = "sha256:e77ab89480905d86998442ac5788f35333fa85f65047a534adc38edf3c88fc3b"},
] ]
pyopenssl = [ pyopenssl = [
{file = "pyOpenSSL-22.0.0-py2.py3-none-any.whl", hash = "sha256:ea252b38c87425b64116f808355e8da644ef9b07e429398bfece610f893ee2e0"}, {file = "pyOpenSSL-22.0.0-py2.py3-none-any.whl", hash = "sha256:ea252b38c87425b64116f808355e8da644ef9b07e429398bfece610f893ee2e0"},

View File

@ -43,11 +43,12 @@ pyOpenSSL = "^22.0"
ua-parser = "^0.16.1" ua-parser = "^0.16.1"
Babel = "^2.10.3" Babel = "^2.10.3"
Werkzeug = "2.1" # removal of parse_rule in 2.2 breaks sphinxcontrib-httpdomain autoflask Werkzeug = "2.1" # removal of parse_rule in 2.2 breaks sphinxcontrib-httpdomain autoflask
Authlib = "=1.0.1" Authlib = "1.1.0"
Flask-Limiter = {version = "^2.6.2", extras = ["redis"]} Flask-Limiter = {version = "^2.6.2", extras = ["redis"]}
PyJWT = "^2.5"
[tool.poetry.dev-dependencies] [tool.poetry.dev-dependencies]
black = "^22.6" black = "^22.8"
freezegun = "^1.2" freezegun = "^1.2"
mypy = "^0.971" mypy = "^0.971"
pytest = "^7.1" pytest = "^7.1"