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
ppl-fasilkom-ui
2020
PPL-C
PPTI-Mobile Apps Monitoring Wabah Tuberkolosis
Neza-Backend
Commits
ce8b6f62
Commit
ce8b6f62
authored
Jun 04, 2020
by
Irwanto
Browse files
[REFACTOR] Fixed codestyle issues
parent
eedf84a7
Pipeline
#49469
passed with stages
in 7 minutes and 55 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
apps/accounts/views.py
View file @
ce8b6f62
...
...
@@ -76,7 +76,10 @@ class AccountViewSet(viewsets.ModelViewSet):
if
isinstance
(
self
.
request
.
user
,
AnonymousUser
):
Account
.
objects
.
create
(
user
=
user
,
**
serializer
.
validated_data
)
else
:
Account
.
objects
.
create
(
user
=
user
,
author
=
self
.
request
.
user
.
account
,
**
serializer
.
validated_data
)
Account
.
objects
.
create
(
user
=
user
,
author
=
self
.
request
.
user
.
account
,
**
serializer
.
validated_data
)
return
Response
(
serializer
.
data
,
status
=
status
.
HTTP_201_CREATED
,
...
...
apps/custom_auth/tests/test_units/test_custom_login.py
View file @
ce8b6f62
...
...
@@ -13,7 +13,7 @@ class CustomAuthTest(APITestCase):
user
=
User
.
objects
.
create
(
username
=
"jonathan"
)
user
.
set_password
(
"justpass"
)
user
.
save
()
cls
.
user
=
user
cls
.
user
=
user
def
_test_success
(
self
,
data
):
response
=
self
.
client
.
post
(
path
=
self
.
URL
,
data
=
data
,
format
=
"json"
)
...
...
apps/custom_auth/views.py
View file @
ce8b6f62
...
...
@@ -19,4 +19,4 @@ class CustomAuthToken(ObtainAuthToken):
user
=
serializer
.
validated_data
[
"user"
]
token
,
_
=
Token
.
objects
.
get_or_create
(
user
=
user
)
return
Response
(
data
=
{
"token"
:
token
.
key
},
status
=
status
.
HTTP_200_OK
)
return
Response
(
data
=
{
"token"
:
token
.
key
},
status
=
status
.
HTTP_200_OK
)
apps/exportables/tests/test_units/test_exportables.py
View file @
ce8b6f62
...
...
@@ -10,15 +10,16 @@ from apps.cases.tests.factories.cases import InvestigationCaseFactory
from
apps.exportables.renderers
import
INVESTIGATION_CASE_RENDERER_FIELDS
def
init_data
():
InvestigationCaseFactory
(
case_subject
=
CaseSubjectFactory
(
district
=
"Beji"
,
age
=
19
,
is_male
=
True
,
),
is_positive
=
True
,
)
case_subject
=
CaseSubjectFactory
(
district
=
"Beji"
,
age
=
19
,
is_male
=
True
,
),
is_positive
=
True
,
)
InvestigationCaseFactory
(
case_subject
=
CaseSubjectFactory
(
district
=
"Cilodong"
,
...
...
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