Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
  • Loading branch information
BeryJu committed Aug 2, 2024
1 parent 29743db commit 20e416b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/e2e/test_provider_ldap.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from docker.client import DockerClient, from_env
from docker.models.containers import Container
from guardian.shortcuts import assign_perm
from ldap3 import ALL, ALL_ATTRIBUTES, ALL_OPERATIONAL_ATTRIBUTES, SUBTREE, Connection, Server
from ldap3.core.exceptions import LDAPInvalidCredentialsResult

Expand Down Expand Up @@ -54,9 +55,9 @@ def _prepare(self) -> User:
ldap: LDAPProvider = LDAPProvider.objects.create(
name=generate_id(),
authorization_flow=Flow.objects.get(slug="default-authentication-flow"),
search_group=self.user.ak_groups.first(),
search_mode=APIAccessMode.CACHED,
)
assign_perm("search_full_directory", self.user, ldap)
# we need to create an application to actually access the ldap
Application.objects.create(name=generate_id(), slug=generate_id(), provider=ldap)
outpost: Outpost = Outpost.objects.create(
Expand Down

0 comments on commit 20e416b

Please sign in to comment.