fix: ordering
This commit is contained in:
@@ -80,3 +80,19 @@ class TestLogin(APITestCase):
|
||||
response = self.client.post(reverse("users:logout"))
|
||||
assert response.status_code == status.HTTP_302_FOUND
|
||||
assert response.url == reverse("web:index")
|
||||
|
||||
def test_login_then_get_logout(self):
|
||||
response = self.client.post(
|
||||
reverse("users:login"),
|
||||
{
|
||||
"username": self.user.username,
|
||||
"password": self.password,
|
||||
},
|
||||
)
|
||||
|
||||
assert response.status_code == status.HTTP_302_FOUND
|
||||
assert response.url == reverse("web:index")
|
||||
|
||||
response = self.client.get(reverse("users:logout"))
|
||||
assert response.status_code == status.HTTP_302_FOUND
|
||||
assert response.url == reverse("web:index")
|
||||
|
||||
Reference in New Issue
Block a user