Fakultas Ilmu Komputer UI

Commit ce8b6f62 authored by Irwanto's avatar Irwanto
Browse files

[REFACTOR] Fixed codestyle issues

parent eedf84a7
Pipeline #49469 passed with stages
in 7 minutes and 55 seconds
......@@ -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,
......
......@@ -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")
......
......@@ -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)
......@@ -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",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment