~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/testing/factory.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2009-07-14 23:06:27 UTC
  • mfrom: (8843.2.2 391235-import)
  • Revision ID: launchpad@pqm.canonical.com-20090714230627-dc70cpwppxgn9o4i
[r=bac][ui=none] Fix the mlist-import.py script so that we can import
        email addresses into a restricted team and its mailing list.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1484
1484
        translation.is_imported = is_imported
1485
1485
        translation.is_current = True
1486
1486
 
1487
 
    def makeTeamAndMailingList(self, team_name, owner_name, visibility=None):
 
1487
    def makeTeamAndMailingList(
 
1488
        self, team_name, owner_name,
 
1489
        visibility=None,
 
1490
        subscription_policy=TeamSubscriptionPolicy.OPEN):
1488
1491
        """Make a new active mailing list for the named team.
1489
1492
 
1490
1493
        :param team_name: The new team's name.
1491
1494
        :type team_name: string
1492
1495
        :param owner_name: The name of the team's owner.
1493
1496
        :type owner: string
 
1497
        :param visibility: The team's visibility. If it's None, the default
 
1498
            (public) will be used.
 
1499
        :type visibility: `PersonVisibility`
 
1500
        :param subscription_policy: The subscription policy of the team.
 
1501
        :type subscription_policy: `TeamSubscriptionPolicy`
1494
1502
        :return: The new team and mailing list.
1495
1503
        :rtype: (`ITeam`, `IMailingList`)
1496
1504
        """
1501
1509
        if team is None:
1502
1510
            team = self.makeTeam(
1503
1511
                owner, displayname=display_name, name=team_name,
1504
 
                visibility=visibility)
 
1512
                visibility=visibility,
 
1513
                subscription_policy=subscription_policy)
1505
1514
        # Any member of the mailing-list-experts team can review a list
1506
1515
        # registration.  It doesn't matter which one.
1507
1516
        experts = getUtility(ILaunchpadCelebrities).mailing_list_experts