예제 #1
0
 def test_retrieve_episodes(self, patient_list):
     instantiated_list = patient_list.get.return_value.return_value
     instantiated_list.to_dict.return_value = {}
     expected = json_response({}).content
     response = api.PatientListViewSet().retrieve(self.mock_request,
                                                  pk='mylist').content
     self.assertEqual(expected, response)
예제 #2
0
파일: test_api.py 프로젝트: jason790/opal
 def test_retrieve_episodes_not_found(self):
     response = api.PatientListViewSet().retrieve(self.mock_request, pk='not a real list at all')
     self.assertEqual(404, response.status_code)