def test_tag_link_pdf_content_education_group_not_permitted(self): result = link_pdf_content_education_group(self.context) expected_result = CUSTOM_LI_TEMPLATE.format( li_attributes=""" id="btn_operation_pdf_content" """, a_attributes=""" href="#" title="{}" {} """.format( _("Generate pdf"), _(""), ), text=_('Generate pdf'), ) self.assertHTMLEqual(result, expected_result)
def test_tag_link_pdf_content_education_group_not_permitted_with_sample_deactivated(self): result = link_pdf_content_education_group(self.context) self.assertEqual( result, { 'url': '#', 'text': 'Générer le pdf', 'class_li': 'disabled', 'title': 'Générer le PDF n\'est pas disponible. Veuillez utiliser EPC.', 'id_li': 'btn_operation_pdf_content', 'load_modal': False } )
def test_tag_link_pdf_content_education_group_not_permitted(self): result = link_pdf_content_education_group(self.context) self.assertEqual( result, { 'url': { 'person': self.person, 'education_group_year': self.education_group_year, 'request': self.request, 'root': self.education_group_year }, 'text': 'Générer le pdf', 'class_li': '', 'title': 'Générer le pdf', 'id_li': 'btn_operation_pdf_content', 'load_modal': True } )
def test_tag_link_pdf_content_education_group_not_permitted_with_sample_deactivated( self): result = link_pdf_content_education_group(self.context) expected_result = CUSTOM_LI_TEMPLATE.format( li_attributes=""" id="btn_operation_pdf_content" """, a_attributes=""" href="#" title="{}" {} """.format( _("Generate pdf"), "", ), text=_('Generate pdf'), ) self.assertEqual( result, { 'url': '#', 'text': 'Générer le pdf', 'class_li': 'disabled', 'title': 'Générer le PDF n\'est pas disponible. Veuillez utiliser EPC.', 'id_li': 'btn_operation_pdf_content', 'load_modal': False })
def test_tag_link_pdf_content_education_group_not_permitted(self): result = link_pdf_content_education_group(self.context) expected_result = CUSTOM_LI_TEMPLATE.format( li_attributes=""" id="btn_operation_pdf_content" """, a_attributes=""" href="#" title="{}" {} """.format( _("Generate pdf"), "", ), text=_('Generate pdf'), ) self.assertEqual( result, { 'url': { 'person': self.person, 'education_group_year': self.education_group_year, 'request': self.request }, 'text': 'Générer le pdf', 'class_li': '', 'title': 'Générer le pdf', 'id_li': 'btn_operation_pdf_content', 'load_modal': True })