Sfoglia il codice sorgente

Add (failing) test for email recipient with delimiter

See #121
Bryan J Swift 11 anni fa
parent
commit
299aba3e4c
1 ha cambiato i file con 10 aggiunte e 0 eliminazioni
  1. 10
    0
      tests.py

+ 10
- 0
tests.py Vedi File

@@ -199,6 +199,16 @@ class MailTests(unittest.TestCase):
199 199
         s.quit()
200 200
         self.assertEmailReceived(subject)
201 201
 
202
+    def test_smtps_delimiter_to(self):
203
+        """Email sent to address with delimiter is delivered"""
204
+        import smtplib
205
+        msg, subject = new_message(TEST_ADDRESS, 'root+foo@sovereign.local')
206
+        s = smtplib.SMTP_SSL(TEST_SERVER, 465)
207
+        s.login(TEST_ADDRESS, TEST_PASSWORD)
208
+        s.sendmail(TEST_ADDRESS, ['root+foo@sovereign.local'], msg)
209
+        s.quit()
210
+        self.assertEmailReceived(subject)
211
+
202 212
     def test_smtps_requires_auth(self):
203 213
         """SMTPS with no authentication is rejected"""
204 214
         import smtplib

Loading…
Annulla
Salva