summaryrefslogtreecommitdiff
path: root/service/test/unit/adapter/test_mail.py
diff options
context:
space:
mode:
authorKlaus Fl <kfleerko@thoughtworks.com>2015-08-07 17:19:25 +0200
committerFolker Bernitt <fbernitt@thoughtworks.com>2015-08-11 17:00:33 +0200
commit319e5e2ddd20444bb30f294a2fd08854dfaae494 (patch)
tree1d341aca9bb601170414275f0cc90b3e19b22359 /service/test/unit/adapter/test_mail.py
parent8585a186716a4f45132e3c9eea90a792ca76c2a2 (diff)
Make indexing recepients work again by fixing serialization bug
Diffstat (limited to 'service/test/unit/adapter/test_mail.py')
-rw-r--r--service/test/unit/adapter/test_mail.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/service/test/unit/adapter/test_mail.py b/service/test/unit/adapter/test_mail.py
index 4751bfdd..d30e2485 100644
--- a/service/test/unit/adapter/test_mail.py
+++ b/service/test/unit/adapter/test_mail.py
@@ -438,6 +438,21 @@ class InputMailTest(unittest.TestCase):
self.assertNotRegexpMatches(mime_multipart.as_string(), "\nCc: \n")
self.assertNotRegexpMatches(mime_multipart.as_string(), "\nSubject: \n")
+ def test_single_recipient(self):
+ mail_single_recipient = {
+ 'body': '',
+ 'header': {
+ 'to': ['to@pixelated.org'],
+ 'cc': [''],
+ 'bcc': [''],
+ 'subject': 'Oi'
+ }
+ }
+
+ result = InputMail.from_dict(mail_single_recipient).raw
+
+ self.assertRegexpMatches(result, 'To: to@pixelated.org')
+
def test_to_mime_multipart(self):
pixelated.support.date.iso_now = lambda: 'date now'