From 46cd29f931a4cac70dc29ebbdfb4b81d51e83fd5 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 19 Mar 2024 11:00:22 +0100 Subject: [PATCH] fix tests --- idhub/tests/test_credentials.py | 2 ++ idhub/tests/test_tables.py | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/idhub/tests/test_credentials.py b/idhub/tests/test_credentials.py index ac95977..e76a279 100644 --- a/idhub/tests/test_credentials.py +++ b/idhub/tests/test_credentials.py @@ -36,6 +36,7 @@ class KeyFirstTimeTest(TestCase): settings.DOMAIN = self.org.name settings.ENABLE_EMAIL = False + settings.LANGUAGE_CODE = 'en' def set_cache(self): cache.set("KEY_DIDS", '1234', None) @@ -94,6 +95,7 @@ class CredentialsViewTest(TestCase): settings.DOMAIN = self.org.name settings.ENABLE_EMAIL = False + settings.LANGUAGE_CODE = 'en' self.admin_login() self.create_schemas() diff --git a/idhub/tests/test_tables.py b/idhub/tests/test_tables.py index 3dfe181..5cf4f92 100644 --- a/idhub/tests/test_tables.py +++ b/idhub/tests/test_tables.py @@ -12,6 +12,7 @@ from django.core.exceptions import FieldError from idhub_auth.models import User from idhub.admin.tables import DashboardTable, UserTable, TemplateTable from idhub.models import Event, Membership, Rol, UserRol, Service, Schemas +from oidc4vp.models import Organization class AdminDashboardTableTest(TestCase): @@ -22,6 +23,10 @@ class AdminDashboardTableTest(TestCase): password='adminpass12') self.admin_user.accept_gdpr=True self.admin_user.save() + self.org = Organization.objects.create(name="testserver", main=True) + settings.LANGUAGE_CODE = 'en' + settings.DOMAIN = self.org.name + settings.ENABLE_EMAIL = False @classmethod def setUpTestData(cls):