mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
Remove pre-Django 1.8 compatibility code
This commit is contained in:
@@ -132,15 +132,9 @@ class MandrillBackendStandardEmailTests(MandrillBackendMockAPITestCase):
|
||||
self.assertEqual(data['message']['html'], html_content)
|
||||
|
||||
def test_reply_to(self):
|
||||
# reply_to is new in Django 1.8 -- before that, you can simply include it in headers
|
||||
try:
|
||||
# noinspection PyArgumentList
|
||||
email = mail.EmailMessage('Subject', 'Body goes here', 'from@example.com', ['to1@example.com'],
|
||||
reply_to=['reply@example.com', 'Other <reply2@example.com>'],
|
||||
headers={'X-Other': 'Keep'})
|
||||
except TypeError:
|
||||
# Pre-Django 1.8
|
||||
raise unittest.SkipTest("Django version doesn't support EmailMessage(reply_to)")
|
||||
email = mail.EmailMessage('Subject', 'Body goes here', 'from@example.com', ['to1@example.com'],
|
||||
reply_to=['reply@example.com', 'Other <reply2@example.com>'],
|
||||
headers={'X-Other': 'Keep'})
|
||||
email.send()
|
||||
data = self.get_api_call_json()
|
||||
self.assertEqual(data['message']['headers']['Reply-To'],
|
||||
|
||||
Reference in New Issue
Block a user