From e71ab6c971ab49758c4af7ca7c7735431b229744 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 03:03:01 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- oauthenticator/tests/test_generic.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/oauthenticator/tests/test_generic.py b/oauthenticator/tests/test_generic.py index 71f26683..6354c328 100644 --- a/oauthenticator/tests/test_generic.py +++ b/oauthenticator/tests/test_generic.py @@ -335,9 +335,13 @@ async def test_generic_claim_groups_key_nested_strings( assert auth_model["admin"] -async def test_generic_auth_model_groups_key_callable(get_authenticator, generic_client): +async def test_generic_auth_model_groups_key_callable( + get_authenticator, generic_client +): c = Config() - c.GenericOAuthenticator.auth_model_groups_key = lambda r: r["auth_state"]["oauth_user"]["policies"]["roles"] + c.GenericOAuthenticator.auth_model_groups_key = lambda r: r["auth_state"][ + "oauth_user" + ]["policies"]["roles"] c.GenericOAuthenticator.allowed_groups = ["super_user"] authenticator = get_authenticator(config=c) @@ -352,7 +356,9 @@ async def test_generic_auth_model_groups_key_nested_strings( get_authenticator, generic_client ): c = Config() - c.GenericOAuthenticator.auth_model_groups_key = "auth_state.oauth_user.permissions.groups" + c.GenericOAuthenticator.auth_model_groups_key = ( + "auth_state.oauth_user.permissions.groups" + ) c.GenericOAuthenticator.admin_groups = ["super_user"] authenticator = get_authenticator(config=c)