fix remaining failing tests
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
parent
526cadcd09
commit
1cbe87c077
|
@ -11,6 +11,7 @@ from authentik.core.models import Application, Group, User
|
|||
from authentik.lib.generators import generate_id
|
||||
from authentik.providers.scim.models import SCIMMapping, SCIMProvider
|
||||
from authentik.providers.scim.tasks import scim_sync
|
||||
from authentik.tenants.utils import get_current_tenant
|
||||
|
||||
|
||||
class SCIMUserTests(TestCase):
|
||||
|
@ -20,6 +21,9 @@ class SCIMUserTests(TestCase):
|
|||
def setUp(self) -> None:
|
||||
# Delete all users and groups as the mocked HTTP responses only return one ID
|
||||
# which will cause errors with multiple users
|
||||
tenant = get_current_tenant()
|
||||
tenant.avatars = "none"
|
||||
tenant.save()
|
||||
User.objects.all().exclude(pk=get_anonymous_user().pk).delete()
|
||||
Group.objects.all().delete()
|
||||
self.provider: SCIMProvider = SCIMProvider.objects.create(
|
||||
|
|
|
@ -57,6 +57,7 @@ class TenantViewSet(ModelViewSet):
|
|||
authentication_classes = []
|
||||
permission_classes = [TenantApiKeyPermission]
|
||||
filter_backends = [OrderingFilter, SearchFilter]
|
||||
filterset_fields = []
|
||||
|
||||
def dispatch(self, request, *args, **kwargs):
|
||||
if not CONFIG.get_bool("tenants.enabled", True):
|
||||
|
@ -86,6 +87,7 @@ class DomainViewSet(ModelViewSet):
|
|||
authentication_classes = []
|
||||
permission_classes = [TenantApiKeyPermission]
|
||||
filter_backends = [OrderingFilter, SearchFilter]
|
||||
filterset_fields = []
|
||||
|
||||
def dispatch(self, request, *args, **kwargs):
|
||||
if not CONFIG.get_bool("tenants.enabled", True):
|
||||
|
|
Reference in New Issue