Fakultas Ilmu Komputer UI

Commit b54e1101 authored by Zafir Rasyidi Taufik's avatar Zafir Rasyidi Taufik
Browse files

[GREEN]Fix incorrect tests

parent fa36003e
Pipeline #77082 passed with stages
in 6 minutes and 10 seconds
......@@ -196,12 +196,6 @@ data = {
"undetermined": 0,
"total_count": 0
},
"Kukusan": {
"positive": 0,
"negative": 1,
"undetermined": 0,
"total_count": 1
},
"Sukamaju": {
"positive": 0,
"negative": 0,
......
......@@ -60,7 +60,7 @@ def init_data():
InvestigationCaseFactory(
case_subject=CaseSubjectFactory(
district="Beji",
sub_district="Kukusan",
sub_district="Beji",
age=21,
is_male=False,
),
......@@ -87,7 +87,6 @@ class ExportableViewTest(APITestCase):
init_data()
def setUp(self):
self.maxDiff = None
self.client = APIClient(HTTP_AUTHORIZATION=HEADER_PREFIX + self.token.key)
def test_exportable_data_return_values(self):
......@@ -201,10 +200,6 @@ class ExportInvestigationCaseViewTest(APITestCase):
def test_export_investigation_data_to_csv_filter_sub_district(self):
body = self.export_csv_test_util("?sub_district=Sukatani")
self.assertEqual(len(body), 1)
def test_export_investigation_data_to_csv_filter_date(self):
body = self.export_csv_test_util("?start_date=2020-12-31&end_date=2021-12-31")
self.assertEqual(len(body), 5)
def test_export_investigation_data_to_csv_wrong_gender_format(self):
self.wrong_query_param_test_util("?is_male=asdf")
......@@ -215,9 +210,6 @@ class ExportInvestigationCaseViewTest(APITestCase):
def test_export_investigation_data_to_csv_wrong_max_age_format(self):
self.wrong_query_param_test_util("?min_age=10&max_age=asd")
def test_export_investigation_data_to_csv_wrong_date(self):
self.wrong_query_param_test_util("?start_date=2020-31-12&end_date=2021-31-12")
class UtilsFunctionsTest(TestCase):
......
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