summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/mail/tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/mail/tests.py b/tests/mail/tests.py
index c7b8d09027..68a15311dc 100644
--- a/tests/mail/tests.py
+++ b/tests/mail/tests.py
@@ -85,6 +85,10 @@ class MailTests(HeadersCheckMixin, SimpleTestCase):
self.assertEqual(message['From'], 'from@example.com')
self.assertEqual(message['To'], 'to@example.com, other@example.com')
+ def test_header_omitted_for_no_to_recipients(self):
+ message = EmailMessage('Subject', 'Content', 'from@example.com', cc=['cc@example.com']).message()
+ self.assertNotIn('To', message)
+
def test_recipients_with_empty_strings(self):
"""
Empty strings in various recipient arguments are always stripped