def test_retrieve_patient(self): response = api.PatientViewSet().retrieve(self.mock_request, pk=self.patient.pk).content expected = _build_json_response(self.patient.to_dict(None)).content self.assertEqual(expected, response)
def test_stores_access_log(self): self.assertEqual(0, models.PatientRecordAccess.objects.count()) response = api.PatientViewSet().retrieve(self.mock_request, pk=self.patient.pk).content self.assertEqual(1, models.PatientRecordAccess.objects.count())
def test_retrieve_episode(self): response = api.PatientViewSet().retrieve(self.mock_request, pk=self.patient.pk) self.assertEqual(self.patient.to_dict(None), response.data)