fix: ordering

This commit is contained in:
2024-11-24 13:36:32 +01:00
parent 1f02858477
commit 7d80c64e40
9 changed files with 67 additions and 7 deletions
+16
View File
@@ -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")