tests/e2e: fix ldap tests
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
4029e19b72
commit
83d2c442a5
|
@ -14,7 +14,7 @@ from ldap3 import (
|
||||||
Connection,
|
Connection,
|
||||||
Server,
|
Server,
|
||||||
)
|
)
|
||||||
from ldap3.core.exceptions import LDAPInsufficientAccessRightsResult
|
from ldap3.core.exceptions import LDAPInvalidCredentialsResult
|
||||||
|
|
||||||
from authentik.core.models import Application, Group, User
|
from authentik.core.models import Application, Group, User
|
||||||
from authentik.events.models import Event, EventAction
|
from authentik.events.models import Event, EventAction
|
||||||
|
@ -131,7 +131,7 @@ class TestProviderLDAP(SeleniumTestCase):
|
||||||
user=f"cn={USER().username},ou=users,DC=ldap,DC=goauthentik,DC=io",
|
user=f"cn={USER().username},ou=users,DC=ldap,DC=goauthentik,DC=io",
|
||||||
password=USER().username + "fqwerwqer",
|
password=USER().username + "fqwerwqer",
|
||||||
)
|
)
|
||||||
with self.assertRaises(LDAPInsufficientAccessRightsResult):
|
with self.assertRaises(LDAPInvalidCredentialsResult):
|
||||||
_connection.bind()
|
_connection.bind()
|
||||||
anon = get_anonymous_user()
|
anon = get_anonymous_user()
|
||||||
self.assertTrue(
|
self.assertTrue(
|
||||||
|
|
Reference in New Issue