diff --git a/care/facility/tests/test_medibase_api.py b/care/facility/tests/test_medibase_api.py index c04812369f..04ac199330 100644 --- a/care/facility/tests/test_medibase_api.py +++ b/care/facility/tests/test_medibase_api.py @@ -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}" diff --git a/care/facility/tests/test_patient_consultation_api.py b/care/facility/tests/test_patient_consultation_api.py index 64b5d8e6e7..0f872386c4 100644 --- a/care/facility/tests/test_patient_consultation_api.py +++ b/care/facility/tests/test_patient_consultation_api.py @@ -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"