Skip to content

Commit

Permalink
fix broken stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
sainak committed Sep 8, 2023
1 parent 635f2e8 commit 9ee065f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion care/facility/tests/test_medibase_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
class TestMedibaseApi(TestUtils, APITestCase):
@classmethod
def setUpTestData(cls) -> None:
cls.user = cls.create_user("staff1", cls.district, home_facility=cls.facility)
cls.state = cls.create_state()
cls.district = cls.create_district(state=cls.state)
cls.user = cls.create_user("staff1", cls.district)

def get_url(self, query=None):
return f"/api/v1/medibase/?query={query}"
Expand Down
3 changes: 3 additions & 0 deletions care/facility/tests/test_patient_consultation_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ def create_admission_consultation(self, patient=None, **kwargs):
res = self.client.post(self.get_url(), data)
return PatientConsultation.objects.get(external_id=res.data["id"])

def update_consultation(self, consultation, **kwargs):
return self.client.patch(self.get_url(consultation), kwargs, "json")

def discharge(self, consultation, **kwargs):
return self.client.post(
f"{self.get_url(consultation)}discharge_patient/", kwargs, "json"
Expand Down

0 comments on commit 9ee065f

Please sign in to comment.