~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/tests/test_person.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-07-30 09:17:36 UTC
  • mfrom: (13555.6.2 bug-761874)
  • Revision ID: launchpad@pqm.canonical.com-20110730091736-jjqwebomgxusdl3u
[r=wallyworld][bug=761874] Stop mailing ~registry on team deletes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
    PersonCreationRationale,
61
61
    PersonVisibility,
62
62
    )
 
63
from lp.registry.interfaces.personnotification import IPersonNotificationSet
63
64
from lp.registry.interfaces.product import IProductSet
64
65
from lp.registry.model.karma import (
65
66
    KarmaCategory,
755
756
        account.openid_identifier = openid_identifier
756
757
        return account
757
758
 
 
759
    def test_delete_no_notifications(self):
 
760
        team = self.factory.makeTeam()
 
761
        owner = team.teamowner
 
762
        transaction.commit()
 
763
        reconnect_stores('IPersonMergeJobSource')
 
764
        team = reload_object(team)
 
765
        owner = reload_object(owner)
 
766
        self.person_set.delete(team, owner)
 
767
        notifications = getUtility(IPersonNotificationSet).getNotificationsToSend()
 
768
        self.assertEqual(0, notifications.count())
 
769
 
758
770
    def test_openid_identifiers(self):
759
771
        # Verify that OpenId Identifiers are merged.
760
772
        duplicate = self.factory.makePerson()