From a014f8b3b7d23554ab8837fe9853f214bc5eb57a Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Sat, 14 Sep 2024 19:44:05 +0200 Subject: [PATCH] tests: avoid reuse of authenticator fixture between tests --- ldapauthenticator/tests/conftest.py | 2 +- ldapauthenticator/tests/test_ldapauthenticator.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ldapauthenticator/tests/conftest.py b/ldapauthenticator/tests/conftest.py index 3dbc48a..5204a35 100644 --- a/ldapauthenticator/tests/conftest.py +++ b/ldapauthenticator/tests/conftest.py @@ -5,7 +5,7 @@ from ..ldapauthenticator import LDAPAuthenticator -@pytest.fixture(scope="session") +@pytest.fixture() def authenticator(): authenticator = LDAPAuthenticator() authenticator.server_address = os.environ.get("LDAP_HOST", "localhost") diff --git a/ldapauthenticator/tests/test_ldapauthenticator.py b/ldapauthenticator/tests/test_ldapauthenticator.py index 09b0819..9df0178 100644 --- a/ldapauthenticator/tests/test_ldapauthenticator.py +++ b/ldapauthenticator/tests/test_ldapauthenticator.py @@ -74,7 +74,6 @@ async def test_ldap_auth_use_lookup_dn(authenticator): None, {"username": "fry", "password": "fry"} ) assert authorized["name"] == "philip j. fry" - authenticator.use_lookup_dn_username = False async def test_ldap_auth_search_filter(authenticator):