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)
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)