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' ])
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', ])
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', ])
def test_display_template(self, find): Subrecord.get_display_template() find.assert_called_with([os.path.join('records', 'subrecord.html')])
def test_display_template_does_not_exist(self): self.assertEqual(None, Subrecord.get_display_template())
def test_display_template(self, find): Subrecord.get_display_template() find.assert_called_with(['records/subrecord.html'])
def test_display_template_list_episode_type(self, find): with self.assertRaises(ValueError): Subrecord.get_display_template(patient_list='test', episode_type='Inpatient')
def test_display_template(self, select): Subrecord.get_display_template() select.assert_called_with(['records/subrecord.html'])