Beispiel #1
0
 def test_display_template_subteam(self, select):
     Subrecord.get_display_template(team='test', subteam='really')
     select.assert_called_with([
         'records/test/really/subrecord.html',
         'records/test/subrecord.html',
         'records/subrecord.html'
     ])
Beispiel #2
0
 def test_display_template_episode_type(self, find):
     with warnings.catch_warnings(record=True):
         Subrecord.get_display_template(episode_type='Inpatient')
         find.assert_called_with([
             'records/inpatient/subrecord.html',
             'records/subrecord.html',
         ])
Beispiel #3
0
 def test_display_template_list(self, find):
     patient_list = MagicMock()
     patient_list.get_template_prefixes = MagicMock(return_value=["test"])
     Subrecord.get_display_template(patient_list=patient_list)
     find.assert_called_with([
         'records/test/subrecord.html',
         'records/subrecord.html',
     ])
Beispiel #4
0
 def test_display_template(self, find):
     Subrecord.get_display_template()
     find.assert_called_with([os.path.join('records', 'subrecord.html')])
Beispiel #5
0
 def test_display_template_does_not_exist(self):
     self.assertEqual(None, Subrecord.get_display_template())
Beispiel #6
0
 def test_display_template(self, find):
     Subrecord.get_display_template()
     find.assert_called_with(['records/subrecord.html'])
Beispiel #7
0
 def test_display_template(self, find):
     Subrecord.get_display_template()
     find.assert_called_with([os.path.join('records', 'subrecord.html')])
Beispiel #8
0
 def test_display_template_does_not_exist(self):
     self.assertEqual(None, Subrecord.get_display_template())
Beispiel #9
0
 def test_display_template_list_episode_type(self, find):
     with self.assertRaises(ValueError):
         Subrecord.get_display_template(patient_list='test',
                                        episode_type='Inpatient')
Beispiel #10
0
 def test_display_template_subteam(self, select):
     Subrecord.get_display_template(team='test', subteam='really')
     select.assert_called_with([
         'records/test/really/subrecord.html',
         'records/test/subrecord.html', 'records/subrecord.html'
     ])
Beispiel #11
0
 def test_display_template(self, select):
     Subrecord.get_display_template()
     select.assert_called_with(['records/subrecord.html'])
Beispiel #12
0
 def test_display_template(self, select):
     Subrecord.get_display_template()
     select.assert_called_with(['records/subrecord.html'])
Beispiel #13
0
 def test_display_template(self, find):
     Subrecord.get_display_template()
     find.assert_called_with(['records/subrecord.html'])