Esempio n. 1
0
 def test_get_context_data_episode_types(self):
     request = self.rf.get('/wat')
     request.user = self.user
     view = views.PatientDetailTemplateView()
     view.request = request
     ctx = view.get_context_data()
     self.assertIn(vars(InpatientEpisode), ctx['episode_categories'])
Esempio n. 2
0
 def test_get_context_data_detail_views(self):
     request = self.rf.get('/wat')
     request.user = self.user
     view = views.PatientDetailTemplateView()
     view.request = request
     ctx = view.get_context_data()
     expected = list(detail.PatientDetailView.for_user(self.user))
     self.assertEqual(expected, list(ctx['detail_views']))