Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sainak committed Mar 30, 2024
1 parent 039009c commit 76a28cd
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions care/facility/models/tests/test_patient.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)

0 comments on commit 76a28cd

Please sign in to comment.