~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: 2011-08-29 11:42:47 UTC
  • mfrom: (13758.2.5 rename-private-team-795771)
  • Revision ID: launchpad@pqm.canonical.com-20110829114247-4dcrebgkji7m3864
[r=sinzui][bug=795771] Allow private teams to be renamed

Show diffs side-by-side

added added

removed removed

Lines of Context:
755
755
            address, person, email_status, account)
756
756
 
757
757
    def makeTeam(self, owner=None, displayname=None, email=None, name=None,
 
758
                 description=None,
758
759
                 subscription_policy=TeamSubscriptionPolicy.OPEN,
759
760
                 visibility=None, members=None):
760
761
        """Create and return a new, arbitrary Team.
764
765
        :type owner: `IPerson` or string
765
766
        :param displayname: The team's display name.  If not given we'll use
766
767
            the auto-generated name.
 
768
        :param description: Team team's description.
767
769
        :type string:
768
770
        :param email: The email address to use as the team's contact address.
769
771
        :type email: string
789
791
            displayname = SPACE.join(
790
792
                word.capitalize() for word in name.split('-'))
791
793
        team = getUtility(IPersonSet).newTeam(
792
 
            owner, name, displayname, subscriptionpolicy=subscription_policy)
 
794
            owner, name, displayname, teamdescription=description,
 
795
            subscriptionpolicy=subscription_policy)
793
796
        if visibility is not None:
794
797
            # Visibility is normally restricted to launchpad.Commercial, so
795
798
            # removing the security proxy as we don't care here.