mirror of
https://github.com/TrentSPalmer/trentpalmerdotorg.git
synced 2024-11-21 17:11:30 -08:00
update accounts/tests/test_log_out_view.py add function test_log_out_view_get
This commit is contained in:
parent
fd5a5cdddd
commit
b6ab46dd69
@ -10,6 +10,13 @@ class TestLogOutViewTestCase(TestCase):
|
||||
user_a.set_password('password_user_a')
|
||||
user_a.save()
|
||||
|
||||
def test_log_out_view_get(self):
|
||||
self.client.login(username='user_a', password='password_user_a')
|
||||
response = self.client.get(reverse('accounts:logout'))
|
||||
self.assertEquals(response.status_code, 200)
|
||||
self.assertTemplateUsed(response, 'confirmation.html')
|
||||
self.assertEquals(response.request['PATH_INFO'], '/accounts/logout/')
|
||||
|
||||
def test_log_out_view(self):
|
||||
self.client.login(username='user_a', password='password_user_a')
|
||||
response = self.client.post(reverse('accounts:logout'), follow=True)
|
||||
|
Loading…
Reference in New Issue
Block a user