def test_ppa_packages_menu_is_enabled(self):
     joe = self.factory.makePerson()
     ppa = self.factory.makeArchive()
     login_person(joe)
     view = create_initialized_view(ppa, "+index")
     menu = ArchiveNavigationMenu(view)
     self.assertTrue(menu.packages().enabled)
Esempio n. 2
0
 def test_ppa_packages_menu_is_enabled(self):
     joe = self.factory.makePerson()
     ppa = self.factory.makeArchive()
     login_person(joe)
     view = create_initialized_view(ppa, "+index")
     menu = ArchiveNavigationMenu(view)
     self.assertTrue(menu.packages().enabled)
Esempio n. 3
0
 def test_packages_authorized_for_commercial_admin_with_subscription(self):
     # A commercial admin should always be able to see +packages even
     # if they have a subscription.
     login('*****@*****.**')
     admins = getUtility(ILaunchpadCelebrities).commercial_admin
     admins.addMember(self.joe, admins)
     login_person(self.joe)
     view = create_initialized_view(self.private_ppa, "+packages")
     menu = ArchiveNavigationMenu(view)
     self.assertTrue(menu.packages().enabled)
 def test_packages_authorized_for_commercial_admin_with_subscription(self):
     # A commercial admin should always be able to see +packages even
     # if they have a subscription.
     login('*****@*****.**')
     admins = getUtility(ILaunchpadCelebrities).commercial_admin
     admins.addMember(self.joe, admins)
     login_person(self.joe)
     view = create_initialized_view(self.private_ppa, "+packages")
     menu = ArchiveNavigationMenu(view)
     self.assertTrue(menu.packages().enabled)
Esempio n. 5
0
 def test_packages_uploader(self):
     """A person with launchpad.Append will also be able to do so"""
     login_person(self.mary)
     view = create_initialized_view(self.private_ppa, "+packages")
     menu = ArchiveNavigationMenu(view)
     self.assertTrue(menu.packages().enabled)
Esempio n. 6
0
 def test_packages_authorized(self):
     """A person with launchpad.{Append,Edit} will be able to do so"""
     login_person(self.private_ppa.owner)
     view = create_initialized_view(self.private_ppa, "+packages")
     menu = ArchiveNavigationMenu(view)
     self.assertTrue(menu.packages().enabled)
Esempio n. 7
0
 def test_packages_link_subscriber(self):
     login_person(self.joe)
     view = create_initialized_view(self.private_ppa, "+index")
     menu = ArchiveNavigationMenu(view)
     self.assertFalse(menu.packages().enabled)
 def test_packages_uploader(self):
     """A person with launchpad.Append will also be able to do so"""
     login_person(self.mary)
     view = create_initialized_view(self.private_ppa, "+packages")
     menu = ArchiveNavigationMenu(view)
     self.assertTrue(menu.packages().enabled)
 def test_packages_authorized(self):
     """A person with launchpad.{Append,Edit} will be able to do so"""
     login_person(self.private_ppa.owner)
     view = create_initialized_view(self.private_ppa, "+packages")
     menu = ArchiveNavigationMenu(view)
     self.assertTrue(menu.packages().enabled)
 def test_packages_link_subscriber(self):
     login_person(self.joe)
     view = create_initialized_view(self.private_ppa, "+index")
     menu = ArchiveNavigationMenu(view)
     self.assertFalse(menu.packages().enabled)