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
39fe5ccc
Commit
39fe5ccc
authored
Apr 29, 2020
by
Jonathan Christopher Jakub
Browse files
[RED] Add test for new account verification status
parent
1baf565c
Pipeline
#43967
failed with stages
in 1 minute and 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
apps/accounts/tests/test_units/test_accounts.py
View file @
39fe5ccc
...
...
@@ -112,6 +112,8 @@ class AccountViewTest(APITestCase):
"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"
,)
...
...
@@ -120,8 +122,13 @@ class AccountViewTest(APITestCase):
self
.
assertEqual
(
response
.
status_code
,
status
.
HTTP_201_CREATED
)
self
.
assertEqual
(
officer_current_count
,
officer_prev_count
+
1
)
new_officer
=
Account
.
objects
.
filter
(
email
=
_account_id
)[
0
]
self
.
assertTrue
(
new_officer
.
is_verified
)
self
.
assertTrue
(
new_officer
.
is_active
)
# Have account creation log for the new officer
new_officer_id
=
Account
.
objects
.
filter
(
email
=
_account_id
)[
0
].
id
new_officer_id
=
new_officer
.
id
response
=
self
.
client
.
get
(
self
.
LOGS_URL
)
response_string
=
response
.
rendered_content
.
decode
(
"utf-8"
)
...
...
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