Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMPL
Class Project
Kape
Commits
5227d6ab
Commit
5227d6ab
authored
Nov 15, 2019
by
Claudio Yosafat
Browse files
Create test for submit skills only number and empty
parent
bc54b300
Pipeline
#25209
failed with stages
in 8 minutes and 54 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
core/tests/test_accounts.py
View file @
5227d6ab
...
...
@@ -254,6 +254,15 @@ class ProfileUpdateTests(APITestCase):
self
.
assertEqual
(
response
.
status_code
,
status
.
HTTP_202_ACCEPTED
)
self
.
assertEqual
(
response
.
data
.
get
(
'interests'
),
'Machine Learning'
)
url
=
'/api/students/'
+
str
(
student_id
)
+
"/profile/"
response
=
self
.
client
.
patch
(
url
,
{
'skills'
:
''
},
format
=
'multipart'
)
self
.
assertEqual
(
response
.
status_code
,
status
.
HTTP_202_ACCEPTED
)
self
.
assertEqual
(
response
.
data
.
get
(
'skills'
),
''
)
url
=
'/api/students/'
+
str
(
student_id
)
+
"/profile/"
response
=
self
.
client
.
patch
(
url
,
{
'skills'
:
'1231231231'
},
format
=
'multipart'
)
self
.
assertEqual
(
response
.
status_code
,
status
.
HTTP_400_BAD_REQUEST
)
@
requests_mock
.
Mocker
()
def
test_student_profile_update_filetype_validation
(
self
,
m
):
mock_csui_oauth_verify
(
m
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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