~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Ian Booth
  • Date: 2011-06-04 04:34:59 UTC
  • mfrom: (13158 devel)
  • mto: This revision was merged to the branch mainline in revision 13160.
  • Revision ID: ian.booth@canonical.com-20110604043459-rptbca7ubw6sfbm1
Fix tests and merge from trunk

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