diff --git a/idhub/tests/test_credentials.py b/idhub/tests/test_credentials.py index c6a76ab..659c5ba 100644 --- a/idhub/tests/test_credentials.py +++ b/idhub/tests/test_credentials.py @@ -2,7 +2,7 @@ import os import json from pathlib import Path -from django.test import TestCase, RequestFactory +from django.test import TestCase from django.core.files.uploadedfile import SimpleUploadedFile from django.core.cache import cache from django.urls import reverse @@ -11,7 +11,6 @@ from django.conf import settings from idhub_auth.models import User from idhub.models import DID, Schemas from oidc4vp.models import Organization -from idhub.admin.views import PeopleListView class AdminDashboardViewTest(TestCase): diff --git a/idhub/tests/test_views.py b/idhub/tests/test_views.py index 10e5b24..37a6df1 100644 --- a/idhub/tests/test_views.py +++ b/idhub/tests/test_views.py @@ -1,9 +1,11 @@ from django.test import TestCase, RequestFactory from django.core.cache import cache from django.urls import reverse +from django.conf import settings from idhub_auth.models import User from idhub.models import Event +from oidc4vp.models import Organization from idhub.admin.views import PeopleListView @@ -23,6 +25,10 @@ class AdminDashboardViewTest(TestCase): password='adminpass12') self.admin_user.accept_gdpr=True self.admin_user.save() + self.org = Organization.objects.create(name="testserver", main=True) + + settings.DOMAIN = self.org.name + settings.ENABLE_EMAIL = False def test_view_url_exists_at_desired_location(self): response = self.client.get('/admin/dashboard/', follow=True)