diff --git a/care/facility/models/tests/test_patient.py b/care/facility/models/tests/test_patient.py index 1d643de05c..4b78aff14f 100644 --- a/care/facility/models/tests/test_patient.py +++ b/care/facility/models/tests/test_patient.py @@ -1,6 +1,7 @@ +from datetime import timedelta + from django.utils.timezone import now from rest_framework import status -from datetime import timedelta from rest_framework.test import APITestCase from care.facility.models import DiseaseStatusEnum @@ -30,18 +31,18 @@ def test_disease_state_recovery_is_aliased_to_recovered(self): def test_age_validation(self): dist_admin = self.create_user("dist_admin", self.district, user_type=30) sample_data = { - "facility":self.facility.external_id, - "blood_group":"AB+", - "gender":1, - "year_of_birth":2003, + "facility": self.facility.external_id, + "blood_group": "AB+", + "gender": 1, + "year_of_birth": 2003, "date_of_birth": now().date() + timedelta(days=365 * 1), "disease_status": "NEGATIVE", "emergency_phone_number": "+919000000666", "is_vaccinated": "false", "number_of_doses": 0, "phone_number": "+919000044343", - } + } self.client.force_authenticate(user=dist_admin) - response = self.client.post("/api/v1/patient/", sample_data,format="json") + response = self.client.post("/api/v1/patient/", sample_data, format="json") self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) self.assertIn("date_of_birth", response.data)