From d8768d9d6c301a1c2913d736779d79e96e5c2966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=82=85=E7=9D=BF=E6=9B=BC?= Date: Wed, 30 Oct 2024 09:43:28 +0800 Subject: [PATCH] add logic for both cms < 4.1 and cms > 4.1 in test_admin. delete url --- tests/test_admin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_admin.py b/tests/test_admin.py index d8367be44..c90133d9f 100644 --- a/tests/test_admin.py +++ b/tests/test_admin.py @@ -2150,9 +2150,9 @@ def test_menuitem_changelist_delete_url_link_opens_in_sideframe(self): url_markup = self.menuitem_modeladmin._get_delete_link(child, request) if CMS_41: - # The url link should keep the sideframe close - self.assertNotIn("js-keep-sideframe", url_markup) - self.assertIn("js-close-sideframe", url_markup) + # The url link should keep the sideframe open by default + self.assertIn("js-keep-sideframe", url_markup) + self.assertNotIn("js-close-sideframe", url_markup) else: # The url link should keep the sideframe open self.assertIn("js-versioning-keep-sideframe", url_markup)