feat: improved coverage

This commit is contained in:
2025-01-16 10:34:47 +01:00
parent b86584a702
commit ebb6d5a5a5
10 changed files with 196 additions and 7 deletions
+15
View File
@@ -96,3 +96,18 @@ class TestLogin(APITestCase):
response = self.client.get(reverse("web:logout"))
assert response.status_code == status.HTTP_302_FOUND
assert response.url == reverse("web:index")
def test_login_then_get_my_account(self):
response = self.client.post(
reverse("web: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("web:my_account"))
assert response.status_code == status.HTTP_200_OK