forked from mirrors/bookwyrm
Adds tests for views
This commit is contained in:
parent
0f09759662
commit
ee301afa61
1 changed files with 21 additions and 1 deletions
|
@ -49,7 +49,27 @@ class LandingViews(TestCase):
|
|||
|
||||
def test_about_page(self):
|
||||
"""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.user = self.local_user
|
||||
result = view(request)
|
||||
|
|
Loading…
Reference in a new issue