From 9fa2d235c9b3ca6b0cd56e06456bf73d02814a8f Mon Sep 17 00:00:00 2001 From: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> Date: Wed, 30 Oct 2024 09:27:57 +0100 Subject: [5.1.x] Fixed #35876 -- Displayed non-ASCII fieldset names when rendering ModelAdmin.fieldsets. Thank you to Namhong Kim for the report, and to Mariusz Felisiak and Marijke Luttekes for the review. Regression in 01ed59f753139afb514170ee7f7384c155ecbc2d. Backport of 2c029c718f45341cdd43ee094c24488743c633e6 from main. --- tests/admin_inlines/tests.py | 4 ++-- tests/admin_views/admin.py | 1 + tests/admin_views/tests.py | 13 +++++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/admin_inlines/tests.py b/tests/admin_inlines/tests.py index 2c148a49f0..4959afb02d 100644 --- a/tests/admin_inlines/tests.py +++ b/tests/admin_inlines/tests.py @@ -1785,7 +1785,7 @@ class TestInlineWithFieldsets(TestDataMixin, TestCase): # The second and third have the same "Advanced options" name, but the # second one has the "collapse" class. for x, classes in ((1, ""), (2, "collapse")): - heading_id = f"fieldset-0-advanced-options-{x}-heading" + heading_id = f"fieldset-0-{x}-heading" with self.subTest(heading_id=heading_id): self.assertContains( response, @@ -1830,7 +1830,7 @@ class TestInlineWithFieldsets(TestDataMixin, TestCase): # Every fieldset defined for an inline's form. for z, fieldset in enumerate(inline_admin_form): if fieldset.name: - heading_id = f"{prefix}-{y}-details-{z}-heading" + heading_id = f"{prefix}-{y}-{z}-heading" self.assertContains( response, f'