示例#1
0
文件: test_api.py 项目: jason790/opal
 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)
示例#2
0
文件: test_api.py 项目: jason790/opal
 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())
示例#3
0
文件: test_api.py 项目: 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)