Fakultas Ilmu Komputer UI

Commit cf9727fa authored by Rony Agus Vian's avatar Rony Agus Vian
Browse files

[REFACTOR] Fix test

parent 867e03ba
Pipeline #81793 passed with stages
in 2 minutes and 47 seconds
......@@ -464,14 +464,14 @@ class AccountViewTest(APITestCase):
def test_update_profile_success(self):
url = self.BASE_URL + "update_profile" + "/"
data = {
"new_username": "changedname",
"new_password": "changedtest",
"confirm_new_password": "changedtest",
"new_name": "changedusername",
"new_email": "email@email.com",
"new_phone_number": "+628899889988",
"new_district": "Beji",
"new_sub_district": "Pondok Cina",
"username": "changedname",
"password": "changedtest",
"confirm_password": "changedtest",
"name": "changedusername",
"email": "email@email.com",
"phone_number": "+628899889988",
"district": "Beji",
"sub_district": "Pondok Cina",
}
response = self.client.put(path=url, data=data, format="json",)
......@@ -481,14 +481,14 @@ class AccountViewTest(APITestCase):
def test_update_profile_fails_with_inconsistent_confirmation_password(self):
url = self.BASE_URL + "update_profile" + "/"
data = {
"new_username": "changedname",
"new_password": "changedtest",
"confirm_new_password": "changedtestinconsistent",
"new_name": "changedusername",
"new_email": "email@email.com",
"new_phone_number": "+628899889988",
"new_district": "Beji",
"new_sub_district": "Pondok Cina",
"username": "changedname",
"password": "changedtest",
"confirm_password": "changedtestinconsistent",
"name": "changedusername",
"email": "email@email.com",
"phone_number": "+628899889988",
"district": "Beji",
"sub_district": "Pondok Cina",
}
response = self.client.put(path=url, data=data, format="json",)
......@@ -498,14 +498,14 @@ class AccountViewTest(APITestCase):
def test_update_profile_fails_with_inconsistent_district_and_sub_district_value(self):
url = self.BASE_URL + "update_profile" + "/"
data = {
"new_username": "changedname",
"new_password": "changedtest",
"confirm_new_password": "changedtestinconsistent",
"new_name": "changedusername",
"new_email": "email@email.com",
"new_phone_number": "+628899889988",
"new_district": "Beji",
"new_sub_district": "Limo",
"username": "changedname",
"password": "changedtest",
"confirm_password": "changedtestinconsistent",
"name": "changedusername",
"email": "email@email.com",
"phone_number": "+628899889988",
"district": "Beji",
"sub_district": "Limo",
}
response = self.client.put(path=url, data=data, format="json",)
......
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