From 5b3ff8469df4a7cb87d53af7f54d1cbf9c260711 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 28 Sep 2021 15:20:10 -0700 Subject: [PATCH] Html validation fix for user admin view --- bookwyrm/templates/settings/users/user.html | 5 +---- bookwyrm/tests/views/admin/test_user_admin.py | 6 +++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/bookwyrm/templates/settings/users/user.html b/bookwyrm/templates/settings/users/user.html index 50dcbb14..676502e6 100644 --- a/bookwyrm/templates/settings/users/user.html +++ b/bookwyrm/templates/settings/users/user.html @@ -4,10 +4,7 @@ {% block title %}{{ user.username }}{% endblock %} {% block header %} {{ user.username }} -

- {% trans "Back to users" %} -

- +{% trans "Back to users" %} {% endblock %} {% block panel %} diff --git a/bookwyrm/tests/views/admin/test_user_admin.py b/bookwyrm/tests/views/admin/test_user_admin.py index dbda2f5f..3336cf24 100644 --- a/bookwyrm/tests/views/admin/test_user_admin.py +++ b/bookwyrm/tests/views/admin/test_user_admin.py @@ -37,7 +37,7 @@ class UserAdminViews(TestCase): result = view(request) self.assertIsInstance(result, TemplateResponse) html = result.render() - _, errors = tidy_document(html.content) + _, errors = tidy_document(html.content, options={"drop-empty-elements": False}) if errors: raise Exception(errors) self.assertEqual(result.status_code, 200) @@ -53,7 +53,7 @@ class UserAdminViews(TestCase): self.assertIsInstance(result, TemplateResponse) html = result.render() - _, errors = tidy_document(html.content) + _, errors = tidy_document(html.content, options={"drop-empty-elements": False}) if errors: raise Exception(errors) self.assertEqual(result.status_code, 200) @@ -78,7 +78,7 @@ class UserAdminViews(TestCase): self.assertIsInstance(result, TemplateResponse) html = result.render() - _, errors = tidy_document(html.content) + _, errors = tidy_document(html.content, options={"drop-empty-elements": False}) if errors: raise Exception(errors)