Adds validate_html to announcement page tests

This commit is contained in:
Mouse Reeve 2021-12-29 10:37:21 -08:00
parent 9facaf404f
commit 161532f8a8

View file

@ -5,6 +5,7 @@ from django.test import TestCase
from django.test.client import RequestFactory
from bookwyrm import forms, models, views
from bookwyrm.tests.validate_html import validate_html
class AnnouncementViews(TestCase):
@ -38,7 +39,7 @@ class AnnouncementViews(TestCase):
result = view(request)
self.assertIsInstance(result, TemplateResponse)
result.render()
validate_html(result.render())
self.assertEqual(result.status_code, 200)
def test_announcements_page_empty(self):
@ -51,7 +52,7 @@ class AnnouncementViews(TestCase):
result = view(request)
self.assertIsInstance(result, TemplateResponse)
result.render()
validate_html(result.render())
self.assertEqual(result.status_code, 200)
def test_announcement_page(self):
@ -68,7 +69,7 @@ class AnnouncementViews(TestCase):
result = view(request, announcement.id)
self.assertIsInstance(result, TemplateResponse)
result.render()
validate_html(result.render())
self.assertEqual(result.status_code, 200)
def test_create_announcement(self):
@ -138,5 +139,5 @@ class AnnouncementViews(TestCase):
result = view(request, self.local_user.localname)
self.assertIsInstance(result, TemplateResponse)
result.render()
validate_html(result.render())
self.assertEqual(result.status_code, 200)