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
2020
PPL-C
PPTI-Mobile Apps Monitoring Wabah Tuberkolosis
Neza-Backend
Commits
0c1b0000
Commit
0c1b0000
authored
May 15, 2020
by
Dave Nathanael
Browse files
[GREEN] Fix test with invalid phone number
parent
4d7d7547
Pipeline
#47241
passed with stages
in 3 minutes
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
apps/accounts/tests/test_units/test_accounts.py
View file @
0c1b0000
...
...
@@ -215,21 +215,23 @@ class AccountViewTest(APITestCase):
"id"
:
str
(
self
.
officer
.
id
),
"name"
:
self
.
faker
.
name
(),
"email"
:
self
.
faker
.
email
(),
"phone_number"
:
self
.
faker
.
phone_number
()
,
"phone_number"
:
"+999999999999"
,
"area"
:
self
.
faker
.
city
(),
"is_admin"
:
False
,
"is_verified"
:
True
,
"is_active"
:
Fals
e
,
"is_active"
:
Tru
e
,
}
prev_outbox_count
=
len
(
mail
.
outbox
)
self
.
client
=
APIClient
(
HTTP_AUTHORIZATION
=
HEADER_PREFIX
+
self
.
token_2
.
key
)
response
=
self
.
client
.
put
(
path
=
url
,
data
=
data
,
format
=
"json"
,)
data
[
"is_active"
]
=
False
response
=
self
.
client
.
put
(
path
=
url
,
data
=
data
,
format
=
"json"
,)
current_outbox_count
=
len
(
mail
.
outbox
)
# Account deactivation email sent
self
.
assertEqual
(
current_outbox_count
,
prev_outbox_count
+
1
)
self
.
assertEqual
(
current_outbox_count
,
prev_outbox_count
+
2
)
def
test_edit_account_fail_without_complete_fields
(
self
):
url
=
self
.
BASE_URL
+
str
(
self
.
officer
.
id
)
+
"/"
...
...
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