Adds tests for views

This commit is contained in:
Mouse Reeve 2022-01-06 09:55:35 -08:00
parent 0f09759662
commit ee301afa61

View file

@ -49,7 +49,27 @@ class LandingViews(TestCase):
def test_about_page(self): def test_about_page(self):
"""there are so many views, this just makes sure it LOADS""" """there are so many views, this just makes sure it LOADS"""
view = views.About.as_view() view = views.about
request = self.factory.get("")
request.user = self.local_user
result = view(request)
self.assertIsInstance(result, TemplateResponse)
validate_html(result.render())
self.assertEqual(result.status_code, 200)
def test_conduct_page(self):
"""there are so many views, this just makes sure it LOADS"""
view = views.conduct
request = self.factory.get("")
request.user = self.local_user
result = view(request)
self.assertIsInstance(result, TemplateResponse)
validate_html(result.render())
self.assertEqual(result.status_code, 200)
def test_privacy_page(self):
"""there are so many views, this just makes sure it LOADS"""
view = views.privacy
request = self.factory.get("") request = self.factory.get("")
request.user = self.local_user request.user = self.local_user
result = view(request) result = view(request)