add PATH_INFO test to accounts/tests/test_log_out_view.py

This commit is contained in:
Trent Palmer 2021-04-18 14:29:31 -07:00
parent 12507888a8
commit 4b2bcae2ed

View File

@ -16,9 +16,11 @@ class TestLogOutViewTestCase(TestCase):
self.assertTrue("Successfully Logged Out" in response.content.decode('utf-8')) self.assertTrue("Successfully Logged Out" in response.content.decode('utf-8'))
self.assertEquals(response.status_code, 200) self.assertEquals(response.status_code, 200)
self.assertTemplateUsed(response, 'audio/index.html') self.assertTemplateUsed(response, 'audio/index.html')
self.assertEquals(response.request['PATH_INFO'], '/')
def test_log_out_view_no_login(self): def test_log_out_view_no_login(self):
response = self.client.post(reverse('accounts:logout'), follow=True) response = self.client.post(reverse('accounts:logout'), follow=True)
self.assertFalse("Successfully Logged Out" in response.content.decode('utf-8')) self.assertFalse("Successfully Logged Out" in response.content.decode('utf-8'))
self.assertEquals(response.status_code, 200) self.assertEquals(response.status_code, 200)
self.assertTemplateUsed(response, 'audio/index.html') self.assertTemplateUsed(response, 'audio/index.html')
self.assertEquals(response.request['PATH_INFO'], '/')