1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #28971 -- Made EmailMessage.message() set Cc from headers dict if it exists.

This commit is contained in:
Jon Dufresne
2017-12-09 06:42:46 -08:00
committed by Tim Graham
parent 6334939417
commit b03d500295
2 changed files with 21 additions and 4 deletions

View File

@@ -132,6 +132,13 @@ class MailTests(HeadersCheckMixin, SimpleTestCase):
['to@example.com', 'other@example.com', 'cc@example.com', 'cc.other@example.com', 'bcc@example.com']
)
def test_cc_headers(self):
message = EmailMessage(
'Subject', 'Content', 'bounce@example.com', ['to@example.com'],
cc=['foo@example.com'], headers={'Cc': 'override@example.com'},
).message()
self.assertEqual(message['Cc'], 'override@example.com')
def test_cc_in_headers_only(self):
message = EmailMessage(
'Subject', 'Content', 'bounce@example.com', ['to@example.com'],