def test_TeamOverviewMenu_check_menu_links_with_mailing(self): self.factory.makeMailingList( self.team, self.team.teamowner) menu = TeamOverviewMenu(self.team) self.assertIs(True, check_menu_links(menu)) link = menu.configure_mailing_list() self.assertEqual('Configure mailing list', link.text)
def test_TeamOverviewMenu_check_menu_links_without_mailing(self): menu = TeamOverviewMenu(self.team) # Remove moderate_mailing_list because it asserts that there is # a mailing list. no_mailinst_list_links = [ link for link in menu.links if link != 'moderate_mailing_list'] menu.links = no_mailinst_list_links self.assertIs(True, check_menu_links(menu)) link = menu.configure_mailing_list() self.assertEqual('Create a mailing list', link.text)
def test_TeamOverviewMenu_check_menu_links_without_mailing(self): menu = TeamOverviewMenu(self.team) # Remove moderate_mailing_list because it asserts that there is # a mailing list. no_mailinst_list_links = [ link for link in menu.links if link != 'moderate_mailing_list' ] menu.links = no_mailinst_list_links self.assertIs(True, check_menu_links(menu)) link = menu.configure_mailing_list() self.assertEqual('Create a mailing list', link.text)
def test_TeamOverviewMenu_check_menu_links_with_mailing(self): self.factory.makeMailingList(self.team, self.team.teamowner) menu = TeamOverviewMenu(self.team) self.assertIs(True, check_menu_links(menu)) link = menu.configure_mailing_list() self.assertEqual('Configure mailing list', link.text)