Avoided direct styles in admin templates.

Direct styles might be forbidden by Content Security Policies.
This commit is contained in:
Claude Paroz 2020-11-10 21:32:15 +01:00 committed by GitHub
parent 4cd77f97a2
commit 187482d743
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -1170,7 +1170,7 @@ class AdminCustomTemplateTests(AdminViewBasicTestCase):
# When a site has multiple passwords in the browser's password manager,
# a browser pop up asks which user the new password is for. To prevent
# this, the username is added to the change password form.
self.assertContains(response, '<input type="text" name="username" value="super" style="display: none">')
self.assertContains(response, '<input type="text" name="username" value="super" class="hidden">')
def test_extended_bodyclass_template_index(self):
"""

View file

@ -56,7 +56,7 @@ class AuthTemplateTests(TestCase):
# browser's password managers.
self.assertContains(
response,
'<input style="display: none;" autocomplete="username" value="jsmith">',
'<input class="hidden" autocomplete="username" value="jsmith">',
)
def test_PasswordResetCompleteView(self):