Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #11928 -- Added test for tuple to list conversion during mail m…

…essage initialization added in r11709. Thanks, Claude Paroz.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16133 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 4b93bd8b3a29913fef56c1090738e03c6205a453 1 parent c78d861
Jannis Leidel authored April 30, 2011

Showing 1 changed file with 6 additions and 0 deletions. Show diff stats Hide diff stats

  1. 6  tests/regressiontests/mail/tests.py
6  tests/regressiontests/mail/tests.py
@@ -93,6 +93,12 @@ def test_cc(self):
93 93
         self.assertEqual(message['Cc'], 'cc@example.com, cc.other@example.com')
94 94
         self.assertEqual(email.recipients(), ['to@example.com', 'other@example.com', 'cc@example.com', 'cc.other@example.com', 'bcc@example.com'])
95 95
 
  96
+    def test_recipients_as_tuple(self):
  97
+        email = EmailMessage('Subject', 'Content', 'from@example.com', ('to@example.com', 'other@example.com'), cc=('cc@example.com', 'cc.other@example.com'), bcc=('bcc@example.com',))
  98
+        message = email.message()
  99
+        self.assertEqual(message['Cc'], 'cc@example.com, cc.other@example.com')
  100
+        self.assertEqual(email.recipients(), ['to@example.com', 'other@example.com', 'cc@example.com', 'cc.other@example.com', 'bcc@example.com'])
  101
+
96 102
     def test_header_injection(self):
97 103
         email = EmailMessage('Subject\nInjection Test', 'Content', 'from@example.com', ['to@example.com'])
98 104
         self.assertRaises(BadHeaderError, email.message)

0 notes on commit 4b93bd8

Please sign in to comment.
Something went wrong with that request. Please try again.