Project

General

Profile

« Previous | Next » 

Revision f46f80e4

Added by Serghei Mihai about 7 years ago

add unsubscription link in mail headers (#19579)

View differences:

tests/test_emailing.py
134 134
                index = i*subscriptions_number+counter
135 135
                signature = urllib.unquote(re.findall('/unsubscribe/(.*)"', mail.outbox[index].html)[0])
136 136
                unsubscription_link = reverse('unsubscribe', kwargs={'unsubscription_token': signature})
137
                assert mail.outbox[index]._headers['List-Unsubscribe'] == '<http://localhost%s>' % unsubscription_link
137 138
                assert unsubscription_link in mail.outbox[index].html
138 139
                assert unsubscription_link in mail.outbox[index].text
139 140
                assert unsubscription_link_sentinel != unsubscription_link

Also available in: Unified diff