fix tests
This commit is contained in:
parent
47fde3eb64
commit
f7bb2bc991
|
@ -2,7 +2,7 @@ import os
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from pathlib import Path
|
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.files.uploadedfile import SimpleUploadedFile
|
||||||
from django.core.cache import cache
|
from django.core.cache import cache
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
|
@ -11,7 +11,6 @@ from django.conf import settings
|
||||||
from idhub_auth.models import User
|
from idhub_auth.models import User
|
||||||
from idhub.models import DID, Schemas
|
from idhub.models import DID, Schemas
|
||||||
from oidc4vp.models import Organization
|
from oidc4vp.models import Organization
|
||||||
from idhub.admin.views import PeopleListView
|
|
||||||
|
|
||||||
|
|
||||||
class AdminDashboardViewTest(TestCase):
|
class AdminDashboardViewTest(TestCase):
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
from django.test import TestCase, RequestFactory
|
from django.test import TestCase, RequestFactory
|
||||||
from django.core.cache import cache
|
from django.core.cache import cache
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
|
from django.conf import settings
|
||||||
|
|
||||||
from idhub_auth.models import User
|
from idhub_auth.models import User
|
||||||
from idhub.models import Event
|
from idhub.models import Event
|
||||||
|
from oidc4vp.models import Organization
|
||||||
from idhub.admin.views import PeopleListView
|
from idhub.admin.views import PeopleListView
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,6 +25,10 @@ class AdminDashboardViewTest(TestCase):
|
||||||
password='adminpass12')
|
password='adminpass12')
|
||||||
self.admin_user.accept_gdpr=True
|
self.admin_user.accept_gdpr=True
|
||||||
self.admin_user.save()
|
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):
|
def test_view_url_exists_at_desired_location(self):
|
||||||
response = self.client.get('/admin/dashboard/', follow=True)
|
response = self.client.get('/admin/dashboard/', follow=True)
|
||||||
|
|
Loading…
Reference in a new issue