def test_model_pass_through(self): result = panels.record_panel(Context({}), HatWearer) self.assertEqual(result["title"], "Wearer of Hats") self.assertEqual( result["detail_template"], HatWearer.get_detail_template() ) self.assertEqual( result["singleton"], False )
def test_model_pass_through(self): result = panels.record_panel(Context({}), HatWearer) self.assertEqual(result["title"], "Wearer of Hats") self.assertEqual( result["detail_template"], HatWearer.get_detail_template() ) self.assertEqual( result["singleton"], False )
def test_record_panel(self): expected = dict( name='demographics', singleton=True, title='Demographics', detail_template='records/demographics_detail.html', icon='fa fa-user', editable=1, angular_filter=None, noentries=None, only_display_if_exists=False, full_width=False, is_patient_subrecord=True, ) result = panels.record_panel(Context({}), Demographics()) self.assertEqual(expected, result.dicts[-1])
def test_record_panel(self): expected = dict( name='demographics', singleton=True, title='Demographics', detail_template='records/demographics_detail.html', icon='fa fa-user', editable=1, angular_filter=None, noentries=None, only_display_if_exists=False, full_width=False, is_patient_subrecord=True, ) result = panels.record_panel(Context({}), Demographics()) self.assertEqual(expected, result.dicts[-1])