From 57c81dac7f4db2b62488edee8e26f12edc3730e7 Mon Sep 17 00:00:00 2001 From: gatsik <74517072+Gatsik@users.noreply.github.com> Date: Thu, 23 Sep 2021 16:29:33 +0300 Subject: [PATCH] =?UTF-8?q?Try=20to=20fix=20W606=20(=E2=80=98async?= =?UTF-8?q?=E2=80=99=20and=20=E2=80=98await=E2=80=99=20are=20reserved=20ke?= =?UTF-8?q?ywords=20starting=20with=20Python=203.7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/integration_tests/test_oauth_session.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/integration_tests/test_oauth_session.py b/tests/integration_tests/test_oauth_session.py index 46bb9d31a..cbe11b3f2 100644 --- a/tests/integration_tests/test_oauth_session.py +++ b/tests/integration_tests/test_oauth_session.py @@ -34,10 +34,11 @@ def oauth2_server(event_loop): @routes.post("/token") async def token(request): data = await request.post() - return await { # noqa: W606 + grant_type_func = { "client_credentials": client_credentials, "refresh_token": refresh_token - }.get(data.get("grant_type"))(data) + }.get(data.get("grant_type")) + return await grant_type_func(data) async def client_credentials(data): if data.get("client_id") != "the_client_id" or \