def test_login_team(self): # login_team() logs in as a member of the given team. team = self.factory.makeTeam() logout() login_team(team) person = self.getLoggedInPerson() self.assertTrue(person.inTeam(team))
def setUp(self): super(TestDistributionMilestoneIndexQueryCount, self).setUp() self.ubuntu = getUtility(ILaunchpadCelebrities).ubuntu self.owner = self.factory.makePerson(name="test-owner") login_team(self.ubuntu.owner) self.ubuntu.owner = self.owner self.sourcepackagename = self.factory.makeSourcePackageName("foo-package") login_person(self.owner) self.milestone = self.factory.makeMilestone(distribution=self.ubuntu)
def setUp(self): super(TestDistributionMilestoneIndexQueryCount, self).setUp() self.ubuntu = getUtility(ILaunchpadCelebrities).ubuntu self.owner = self.factory.makePerson(name='test-owner') login_team(self.ubuntu.owner) self.ubuntu.owner = self.owner self.sourcepackagename = self.factory.makeSourcePackageName( 'foo-package') login_person(self.owner) self.milestone = self.factory.makeMilestone(distribution=self.ubuntu)
def test_login_team_returns_logged_in_person(self): # login_team returns the logged-in person. team = self.factory.makeTeam() logout() person = login_team(team) self.assertLoggedIn(person)