Html validation fix for user admin view

This commit is contained in:
Mouse Reeve 2021-09-28 15:20:10 -07:00
parent ada3e1d4d6
commit 5b3ff8469d
2 changed files with 4 additions and 7 deletions

View file

@ -4,10 +4,7 @@
{% block title %}{{ user.username }}{% endblock %}
{% block header %}
{{ user.username }}
<p class="help has-text-weight-normal">
<a href="{% url 'settings-users' %}">{% trans "Back to users" %}</a>
</p>
<a class="help has-text-weight-normal" href="{% url 'settings-users' %}">{% trans "Back to users" %}</a>
{% endblock %}
{% block panel %}

View file

@ -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)