diff --git a/ldapauthenticator/ldapauthenticator.py b/ldapauthenticator/ldapauthenticator.py index 95795cf..e010180 100644 --- a/ldapauthenticator/ldapauthenticator.py +++ b/ldapauthenticator/ldapauthenticator.py @@ -311,7 +311,7 @@ def _validate_bind_dn_template(self, proposal): List of user attributes to be returned in auth_state Will be available in `auth_state["user_attributes"]` - """ + """, ) use_lookup_dn_username = Bool( diff --git a/ldapauthenticator/tests/test_ldapauthenticator.py b/ldapauthenticator/tests/test_ldapauthenticator.py index 03a83a3..9c037f3 100644 --- a/ldapauthenticator/tests/test_ldapauthenticator.py +++ b/ldapauthenticator/tests/test_ldapauthenticator.py @@ -125,6 +125,7 @@ async def test_ldap_auth_search_filter(authenticator): ) assert authorized is None + async def test_allow_config(authenticator): # test various sources of allow config @@ -167,7 +168,9 @@ async def test_ldap_auth_state_attributes(authenticator): None, {"username": "fry", "password": "fry"} ) assert authorized["name"] == "fry" - assert authorized["auth_state"]["user_attributes"] == {"employeeType": ["Delivery boy"]} + assert authorized["auth_state"]["user_attributes"] == { + "employeeType": ["Delivery boy"] + } async def test_ldap_auth_state_attributes2(authenticator):