Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
PPL Sosial
tbcare
tbcare-backend
Commits
cf9727fa
Commit
cf9727fa
authored
Jun 06, 2021
by
Rony Agus Vian
Browse files
[REFACTOR] Fix test
parent
867e03ba
Pipeline
#81793
passed with stages
in 2 minutes and 47 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
apps/accounts/tests/test_units/test_accounts.py
View file @
cf9727fa
...
...
@@ -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"
,)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment