~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-06-03 01:24:37 UTC
  • mfrom: (13137.1.11 ppa-api)
  • Revision ID: launchpad@pqm.canonical.com-20110603012437-1hy2195abrbycdtk
[r=allenap][bug=776444,776449] Export PPA dependency APIs

Show diffs side-by-side

added added

removed removed

Lines of Context:
593
593
        self, email=None, name=None, password=None,
594
594
        email_address_status=None, hide_email_addresses=False,
595
595
        displayname=None, time_zone=None, latitude=None, longitude=None,
596
 
        selfgenerated_bugnotifications=False):
 
596
        selfgenerated_bugnotifications=False, member_of=()):
597
597
        """Create and return a new, arbitrary Person.
598
598
 
599
599
        :param email: The email address for the new person.
658
658
 
659
659
        self.makeOpenIdIdentifier(person.account)
660
660
 
 
661
        for team in member_of:
 
662
            with person_logged_in(team.teamowner):
 
663
                team.addMember(person, team.teamowner)
 
664
 
661
665
        # Ensure updated ValidPersonCache
662
666
        flush_database_updates()
663
667
        return person