mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
Tests: better recipient addresses for live integration tests
Some ESPs have special blacklist handling for mailinator.com; switch to (deliverable, blackholed) anymail.info test addresses.
This commit is contained in:
@@ -33,7 +33,7 @@ class MandrillBackendIntegrationTests(SimpleTestCase, AnymailTestMixin):
|
||||
def setUp(self):
|
||||
super(MandrillBackendIntegrationTests, self).setUp()
|
||||
self.message = mail.EmailMultiAlternatives('Anymail Mandrill integration test', 'Text content',
|
||||
'from@example.com', ['anymail-test-to1@mailinator.com'])
|
||||
'from@example.com', ['test+to1@anymail.info'])
|
||||
self.message.attach_alternative('<p>HTML content</p>', "text/html")
|
||||
|
||||
def test_simple_send(self):
|
||||
@@ -43,8 +43,8 @@ class MandrillBackendIntegrationTests(SimpleTestCase, AnymailTestMixin):
|
||||
|
||||
# noinspection PyUnresolvedReferences
|
||||
anymail_status = self.message.anymail_status
|
||||
sent_status = anymail_status.recipients['anymail-test-to1@mailinator.com'].status
|
||||
message_id = anymail_status.recipients['anymail-test-to1@mailinator.com'].message_id
|
||||
sent_status = anymail_status.recipients['test+to1@anymail.info'].status
|
||||
message_id = anymail_status.recipients['test+to1@anymail.info'].message_id
|
||||
|
||||
self.assertIn(sent_status, ['sent', 'queued']) # successful send (could still bounce later)
|
||||
self.assertGreater(len(message_id), 0) # don't know what it'll be, but it should exist
|
||||
@@ -57,9 +57,9 @@ class MandrillBackendIntegrationTests(SimpleTestCase, AnymailTestMixin):
|
||||
subject="Anymail Mandrill all-options integration test",
|
||||
body="This is the text body",
|
||||
from_email="Test From <from@example.com>",
|
||||
to=["anymail-test-to1@mailinator.com", "Recipient 2 <anymail-test-to2@mailinator.com>"],
|
||||
cc=["anymail-test-cc1@mailinator.com", "Copy 2 <anymail-test-cc2@mailinator.com>"],
|
||||
bcc=["anymail-test-bcc1@mailinator.com", "Blind Copy 2 <anymail-test-bcc2@mailinator.com>"],
|
||||
to=["test+to1@anymail.info", "Recipient 2 <test+to2@anymail.info>"],
|
||||
cc=["test+cc1@anymail.info", "Copy 2 <test+cc2@anymail.info>"],
|
||||
bcc=["test+bcc1@anymail.info", "Blind Copy 2 <test+bcc2@anymail.info>"],
|
||||
reply_to=["reply1@example.com", "Reply 2 <reply2@example.com>"],
|
||||
headers={"X-Anymail-Test": "value"},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user