Ticket #11928: 11928-test.diff

File 11928-test.diff, 1.1 KB (added by Claude Paroz, 13 years ago)

Test that problem has been resolved

  • tests/regressiontests/mail/tests.py

    diff --git a/tests/regressiontests/mail/tests.py b/tests/regressiontests/mail/tests.py
    index ffb86db..d68855e 100644
    a b class MailTests(TestCase):  
    9393        self.assertEqual(message['Cc'], 'cc@example.com, cc.other@example.com')
    9494        self.assertEqual(email.recipients(), ['to@example.com', 'other@example.com', 'cc@example.com', 'cc.other@example.com', 'bcc@example.com'])
    9595
     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
    96102    def test_header_injection(self):
    97103        email = EmailMessage('Subject\nInjection Test', 'Content', 'from@example.com', ['to@example.com'])
    98104        self.assertRaises(BadHeaderError, email.message)
Back to Top