')
# search_fields with search_help_text.
m.search_help_text = "Search help text"
request = self._mocked_authenticated_request("/band/", superuser)
@@ -1531,7 +1531,14 @@ class ChangeListTests(TestCase):
self.assertEqual(
response.context_data["cl"].search_help_text, "Search help text"
)
- self.assertContains(response, '
Search help text
')
+ self.assertContains(
+ response, '
Search help text
'
+ )
+ self.assertContains(
+ response,
+ '
',
+ )
class GetAdminLogTests(TestCase):
diff --git a/tests/admin_inlines/tests.py b/tests/admin_inlines/tests.py
index 9002af9933..aab20dfd55 100644
--- a/tests/admin_inlines/tests.py
+++ b/tests/admin_inlines/tests.py
@@ -263,9 +263,7 @@ class TestInline(TestDataMixin, TestCase):
stacked and tabular layouts.
"""
response = self.client.get(reverse("admin:admin_inlines_holder4_add"))
- self.assertContains(
- response, '
Awesome stacked help text is awesome.
', 4
- )
+ self.assertContains(response, "Awesome stacked help text is awesome.", 4)
self.assertContains(
response,
'
'
+ )
+
@override_settings(
+ AUTH_PASSWORD_VALIDATORS=[
+ {
+ "NAME": (
+ "django.contrib.auth.password_validation."
+ "UserAttributeSimilarityValidator"
+ )
+ },
+ {
+ "NAME": (
+ "django.contrib.auth.password_validation." "NumericPasswordValidator"
+ )
+ },
+ ],
TEMPLATES=[
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
@@ -1470,7 +1505,7 @@ class AdminViewBasicTest(AdminViewBasicTestCase):
],
},
}
- ]
+ ],
)
class AdminCustomTemplateTests(AdminViewBasicTestCase):
def test_custom_model_admin_templates(self):
@@ -1563,6 +1598,19 @@ class AdminCustomTemplateTests(AdminViewBasicTestCase):
response, '
'
)
+ # help text for passwords has an id.
+ self.assertContains(
+ response,
+ '
- '
+ "Your password can’t be too similar to your other personal information."
+ "
- Your password can’t be entirely numeric.
",
+ )
+ self.assertContains(
+ response,
+ '
'
+ "Enter the same password as before, for verification.
",
+ )
+
def test_extended_bodyclass_template_index(self):
"""
The admin/index.html template uses block.super in the bodyclass block.
@@ -6271,17 +6319,17 @@ class ReadonlyTest(AdminFieldExtractionMixin, TestCase):
self.assertContains(response, '
')
self.assertContains(response, '