fix tests

This commit is contained in:
Cayo Puigdefabregas 2024-03-04 19:00:44 +01:00
parent 47fde3eb64
commit f7bb2bc991
2 changed files with 7 additions and 2 deletions

View File

@ -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):

View File

@ -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)