Add initial implementations for forms and organization apps with serializers, factories, and admin configurations
Some checks failed
CI/CD Pipeline / Run Tests (push) Failing after 45s
CI/CD Pipeline / Code Quality Checks (push) Failing after 48s
CI/CD Pipeline / Build Docker Images (push) Has been skipped
CI/CD Pipeline / Push to Gitea Registry (push) Has been skipped
CI/CD Pipeline / Deploy to Server (push) Has been skipped

This commit is contained in:
2026-03-28 18:23:06 +01:00
parent 8ed3e1175c
commit 345b1d0cc8
201 changed files with 15097 additions and 6691 deletions

View File

@@ -86,7 +86,7 @@ class LoginViewTest(APITestCase):
self.password = fake.password(length=12, special_chars=False)
self.user = UserFactory.create_user(password=self.password)
self.login_data = {"email": self.user.email, "password": self.password}
self.login_data = {"username": self.user.username, "password": self.password}
def test_login_success(self):
"""Test successful login"""
@@ -109,7 +109,7 @@ class LoginViewTest(APITestCase):
def test_login_nonexistent_user(self):
"""Test login fails for nonexistent user"""
data = {
"email": fake.unique.email(),
"username": fake.unique.user_name(),
"password": fake.password(length=12, special_chars=False),
}
@@ -191,6 +191,7 @@ class ProfileDetailViewTest(APITestCase):
self.update_data = {
"first_name": fake.first_name(),
"mid_name": fake.first_name(),
"last_name": fake.last_name(),
"bio": fake.text(max_nb_chars=200),
}
@@ -208,11 +209,13 @@ class ProfileDetailViewTest(APITestCase):
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data["first_name"], self.update_data["first_name"])
self.assertEqual(response.data["mid_name"], self.update_data["mid_name"])
self.assertEqual(response.data["last_name"], self.update_data["last_name"])
# Verify in database
self.profile.refresh_from_db()
self.assertEqual(self.profile.first_name, self.update_data["first_name"])
self.assertEqual(self.profile.mid_name, self.update_data["mid_name"])
def test_profile_created_if_not_exists(self):
"""Test profile is created if it doesn't exist"""