From ffb5ca2bf8994b453c09180e3aac39cd3ae8b26a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=82=85=E7=9D=BF=E6=9B=BC?= Date: Thu, 24 Oct 2024 15:38:59 +0800 Subject: [PATCH] add CMS 4.1 compatiable changes. fix skip message. --- tests/test_admin.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test_admin.py b/tests/test_admin.py index a7c54e5..b7d3db6 100644 --- a/tests/test_admin.py +++ b/tests/test_admin.py @@ -1,4 +1,4 @@ -from unittest import skipIf, skip +from unittest import skipIf from django.contrib import admin from django.contrib.contenttypes.models import ContentType @@ -21,7 +21,7 @@ class AliasAdminReferencesMonkeyPatchTestCase(CMSTestCase): - @skip("skip for now, KeyError at line 52: 'language'.") + @skipIf(DJANGO_CMS_4_1, "skip for now, KeyError at line 52: 'language'.") def test_list_display(self): """ The monkeypatch extends the alias admin, adding the show references link @@ -43,7 +43,6 @@ def test_list_display(self): else: alias_admin = AliasContentAdmin(AliasContent, admin.AdminSite()) func = alias_admin.get_list_display(request)[-1] - print(f'------------------------{alias_admin.get_list_display(request)[-1]}') references_url = reverse_lazy( "djangocms_references:references-index", kwargs={"content_type_id": content_type.id, "object_id": alias.id}