예제 #1
0
 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)
예제 #2
0
 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)
예제 #3
0
 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)
예제 #4
0
 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)