~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-10 19:46:57 UTC
  • mfrom: (13137.1.21 ppa-api)
  • Revision ID: launchpad@pqm.canonical.com-20110610194657-qpovv3hj69uyqpw8
[r=gmb][bug=776444,
 776449] Provide PPA dependency controls via the web service.

Show diffs side-by-side

added added

removed removed

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