forked from mirrors/bookwyrm
Html validation fix for user admin view
This commit is contained in:
parent
ada3e1d4d6
commit
5b3ff8469d
2 changed files with 4 additions and 7 deletions
|
@ -4,10 +4,7 @@
|
||||||
{% block title %}{{ user.username }}{% endblock %}
|
{% block title %}{{ user.username }}{% endblock %}
|
||||||
{% block header %}
|
{% block header %}
|
||||||
{{ user.username }}
|
{{ user.username }}
|
||||||
<p class="help has-text-weight-normal">
|
<a class="help has-text-weight-normal" href="{% url 'settings-users' %}">{% trans "Back to users" %}</a>
|
||||||
<a href="{% url 'settings-users' %}">{% trans "Back to users" %}</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block panel %}
|
{% block panel %}
|
||||||
|
|
|
@ -37,7 +37,7 @@ class UserAdminViews(TestCase):
|
||||||
result = view(request)
|
result = view(request)
|
||||||
self.assertIsInstance(result, TemplateResponse)
|
self.assertIsInstance(result, TemplateResponse)
|
||||||
html = result.render()
|
html = result.render()
|
||||||
_, errors = tidy_document(html.content)
|
_, errors = tidy_document(html.content, options={"drop-empty-elements": False})
|
||||||
if errors:
|
if errors:
|
||||||
raise Exception(errors)
|
raise Exception(errors)
|
||||||
self.assertEqual(result.status_code, 200)
|
self.assertEqual(result.status_code, 200)
|
||||||
|
@ -53,7 +53,7 @@ class UserAdminViews(TestCase):
|
||||||
|
|
||||||
self.assertIsInstance(result, TemplateResponse)
|
self.assertIsInstance(result, TemplateResponse)
|
||||||
html = result.render()
|
html = result.render()
|
||||||
_, errors = tidy_document(html.content)
|
_, errors = tidy_document(html.content, options={"drop-empty-elements": False})
|
||||||
if errors:
|
if errors:
|
||||||
raise Exception(errors)
|
raise Exception(errors)
|
||||||
self.assertEqual(result.status_code, 200)
|
self.assertEqual(result.status_code, 200)
|
||||||
|
@ -78,7 +78,7 @@ class UserAdminViews(TestCase):
|
||||||
|
|
||||||
self.assertIsInstance(result, TemplateResponse)
|
self.assertIsInstance(result, TemplateResponse)
|
||||||
html = result.render()
|
html = result.render()
|
||||||
_, errors = tidy_document(html.content)
|
_, errors = tidy_document(html.content, options={"drop-empty-elements": False})
|
||||||
if errors:
|
if errors:
|
||||||
raise Exception(errors)
|
raise Exception(errors)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue