diff options
| author | shabbyrobe <code@shabbyrobe.org> | 2016-05-27 15:17:01 +1000 | 
|---|---|---|
| committer | shabbyrobe <code@shabbyrobe.org> | 2016-05-27 16:28:50 +1000 | 
| commit | dd39512b7ca617c9cd3c2e29c8e3ec068631b9e8 (patch) | |
| tree | ed1ff87d2dbac18c5a726f91a629a5a052a79b6b /service/test | |
| parent | ee5b5198e89f23cd49d41dc58fb93443b5d8c9e1 (diff) | |
Issue #695: Show all recipients in mail sent folder
Diffstat (limited to 'service/test')
| -rw-r--r-- | service/test/unit/adapter/services/test_mail_sender.py | 14 | 
1 files changed, 14 insertions, 0 deletions
diff --git a/service/test/unit/adapter/services/test_mail_sender.py b/service/test/unit/adapter/services/test_mail_sender.py index 0f02f759..863ac81a 100644 --- a/service/test/unit/adapter/services/test_mail_sender.py +++ b/service/test/unit/adapter/services/test_mail_sender.py @@ -77,6 +77,20 @@ class MailSenderTest(unittest.TestCase):              verify(OutgoingMail).send_message(any(), TwistedSmtpUserCapture(recipient))      @defer.inlineCallbacks +    def test_send_leaves_mail_in_tact(self): +        input_mail_dict = mail_dict() +        input_mail = InputMail.from_dict(input_mail_dict, from_address='pixelated@org') + +        when(OutgoingMail).send_message(any(), any()).thenReturn(defer.succeed(None)) + +        yield self.sender.sendmail(input_mail) + +        self.assertEqual(input_mail.to, input_mail_dict["header"]["to"]) +        self.assertEqual(input_mail.cc, input_mail_dict["header"]["cc"]) +        self.assertEqual(input_mail.bcc, input_mail_dict["header"]["bcc"]) +        self.assertEqual(input_mail.subject, input_mail_dict["header"]["subject"]) + +    @defer.inlineCallbacks      def test_problem_with_email_raises_exception(self):          input_mail = InputMail.from_dict(mail_dict(), from_address='pixelated@org')  | 
