Fakultas Ilmu Komputer UI

Commit 8681d492 authored by Jonathan Christopher Jakub's avatar Jonathan Christopher Jakub
Browse files

[REFACTOR] Change lint style

parent e98e5c10
Pipeline #38361 passed with stages
in 2 minutes and 54 seconds
......@@ -43,6 +43,6 @@ class Migration(migrations.Migration):
),
),
],
options={"verbose_name_plural": "accounts", "db_table": "account",},
options={"verbose_name_plural": "accounts", "db_table": "account", },
),
]
......@@ -12,13 +12,11 @@ from apps.constants import HEADER_PREFIX
from apps.constants import TIMEZONE
class CaseSubjectViewTest(APITestCase):
@classmethod
def setUpTestData(self):
self.BASE_URL = "/cases/case-subjects/"
self.user_1 = UserFactory(username="user_1", password="justpass")
self.user_2 = UserFactory(username="user_2", password="justpass")
self.admin = AccountFactory(admin=True, user=self.user_1)
......
......@@ -107,11 +107,7 @@ class InvestigationCaseViewTest(APITestCase):
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_retrieve_investigation_case_fails_on_deleted_subject(self):
url = (
self.BASE_URL
+ str(self.other_deleted_case.revision_id)
+ "/"
)
url = self.BASE_URL + str(self.other_deleted_case.revision_id) + "/"
response = self.client.get(url)
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
......@@ -197,11 +193,7 @@ class InvestigationCaseViewTest(APITestCase):
)
def test_edit_inactive_investigation_case_fails(self):
url = (
self.BASE_URL
+ str(self.other_inactive_case.revision_id)
+ "/"
)
url = self.BASE_URL + str(self.other_inactive_case.revision_id) + "/"
data = {
"case_subject_id": str(self.other_inactive_case.case_subject_id),
"reference_case_id": str(self.reference_case.case_id),
......@@ -265,11 +257,7 @@ class InvestigationCaseViewTest(APITestCase):
self.assertEqual(current_deleted_count, prev_deleted_count + 1)
def test_delete_inactive_investigation_case_fails(self):
url = (
self.BASE_URL
+ str(self.other_inactive_case.revision_id)
+ "/"
)
url = self.BASE_URL + str(self.other_inactive_case.revision_id) + "/"
response = self.client.delete(url)
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
......@@ -106,9 +106,7 @@ class MonitoringCaseViewTest(APITestCase):
self.assertEqual(response.status_code, status.HTTP_200_OK)
def test_retrieve_monitoring_case_fails_on_deleted_subject(self):
url = (
self.BASE_URL + str(self.other_deleted_case.revision_id) + "/"
)
url = self.BASE_URL + str(self.other_deleted_case.revision_id) + "/"
response = self.client.get(url)
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
......@@ -166,9 +164,7 @@ class MonitoringCaseViewTest(APITestCase):
)
def test_edit_inactive_monitoring_case_fails(self):
url = (
self.BASE_URL + str(self.other_inactive_case.revision_id) + "/"
)
url = self.BASE_URL + str(self.other_inactive_case.revision_id) + "/"
data = {
"positive_case_id": str(self.positive_case.revision_id),
......@@ -203,8 +199,6 @@ class MonitoringCaseViewTest(APITestCase):
)
def test_delete_inactive_monitoring_case_fails(self):
url = (
self.BASE_URL + str(self.other_inactive_case.revision_id) + "/"
)
url = self.BASE_URL + str(self.other_inactive_case.revision_id) + "/"
response = self.client.delete(url)
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
......@@ -82,12 +82,9 @@ class ActivityLogViewTest(APITestCase):
def test_list_logs_paginate_failed(self):
url = "/logs/?page=100"
response = self.client.get(url)
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
response_string = response.rendered_content.decode("utf-8")
self.assertIn('"detail":"Invalid page."', response_string)
def test_get_logged_revision_success(self):
......
......@@ -6,9 +6,7 @@ from rest_framework.pagination import PageNumberPagination
from django_filters.rest_framework import DjangoFilterBackend
from apps.logs.models import Log
from apps.logs.serializers import (
LogSummarySerializer,
)
from apps.logs.serializers import LogSummarySerializer
from apps.commons.permissions import IsAuthorOrAdministrator
......
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