Added additional quiz accessibility test.

This commit is contained in:
neviyn 2016-01-26 21:25:00 +00:00
parent ce79ffe566
commit 2164e73579

View File

@ -52,6 +52,12 @@ class TestLogin(BaseTestCase):
response = self.client.get('/quiz') response = self.client.get('/quiz')
self.assertRedirects(response, '/') self.assertRedirects(response, '/')
def test_quiz_accessible_with_login(self):
self.login()
response = self.client.get('/quiz')
self.assert200(response)
self.assertTemplateUsed("quiz.html")
def test_user_items_inaccessible_without_login(self): def test_user_items_inaccessible_without_login(self):
response = self.client.get('/user_items') response = self.client.get('/user_items')
self.assertRedirects(response, '/') self.assertRedirects(response, '/')