~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/mail/notification.py

  • Committer: Curtis Hovey
  • Date: 2011-08-21 14:21:06 UTC
  • mto: This revision was merged to the branch mainline in revision 13745.
  • Revision ID: curtis.hovey@canonical.com-20110821142106-x93hajd6iguma8gx
Update test that was enforcing bad grammar.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    get_contact_email_addresses,
24
24
    get_email_template,
25
25
    )
26
 
from canonical.launchpad.webapp.interfaces import ILaunchpadRoot
 
26
from canonical.launchpad.interfaces.launchpad import ILaunchpadRoot
27
27
from canonical.launchpad.webapp.publisher import canonical_url
28
28
from canonical.launchpad.webapp.url import urlappend
29
29
from lp.registry.interfaces.mailinglist import IHeldMessageDetails
65
65
    to be sent to users as well, but for now we only use it for teams.
66
66
    """
67
67
    member = event.member
68
 
    assert member.is_team
 
68
    assert member.isTeam()
69
69
    team = event.team
70
70
    membership = getUtility(ITeamMembershipSet).getByPersonAndTeam(
71
71
        member, team)
131
131
        member_addrs = get_contact_email_addresses(person)
132
132
 
133
133
        headers = {}
134
 
        if person.is_team:
 
134
        if person.isTeam():
135
135
            templatename = 'new-member-notification-for-teams.txt'
136
136
            subject = '%s joined %s' % (person.name, team.name)
137
137
            header_rational = "Indirect member (%s)" % team.name
215
215
    for address in admin_addrs:
216
216
        recipient = getUtility(IPersonSet).getByEmail(address)
217
217
        replacements['recipient_name'] = recipient.displayname
218
 
        if recipient.is_team:
 
218
        if recipient.isTeam():
219
219
            header_rationale = 'Admin (%s via %s)' % (
220
220
                team.name, recipient.name)
221
221
            footer_rationale = (