Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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())
Exemplo n.º 3
0
Arquivo: test_api.py Projeto: wjt/opal
 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)