Skip to content

Commit aa352b2

Browse files
committedJan 24, 2023
fix: test_logout_unauthorised test
1 parent c1eb19b commit aa352b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎auth/views/tests.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ def test_logout_success(self):
6969

7070
def test_logout_unauthorised(self):
7171
response = self.client.post(reverse('logout'))
72-
self.assertTrue(self.client.is_access_denied(response))
72+
self.assertRedirects(response=response, expected_url=f'/', fetch_redirect_response=False)
73+
self.assertFalse(self.client.is_authorised())
7374

7475
def test_logout_wrong_method(self):
7576
self.client.authorise()

0 commit comments

Comments
 (0)
Please sign in to comment.