Fakultas Ilmu Komputer UI

Commit 2089805a authored by Jonathan Christopher Jakub's avatar Jonathan Christopher Jakub
Browse files

[RED] Add handler for existing users

parent 17583834
Pipeline #43983 failed with stages
in 1 minute and 48 seconds
......@@ -137,6 +137,22 @@ class AccountViewTest(APITestCase):
f'"action_type":"{ACTIVITY_TYPE_CREATE}"', response_string
)
def test_create_existing_user_fails(self):
url = self.BASE_URL
data = {
"name": self.faker.name(),
"username": "user_1",
"password": "justpass",
"email": self.faker.email(),
"phone_number": self.faker.phone_number(),
"area": self.faker.city(),
"is_admin": False,
"is_verified": True,
"is_active": True,
}
response = self.client.post(path=url, data=data, format="json",)
self.assertEqual(response.status_code, status.HTTP_409_CONFLICT)
def test_create_new_account_fails_with_poor_password(self):
url = self.BASE_URL
_account_id = self.faker.email()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment