You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
686 B

  1. # -*- coding: utf-8 -*-
  2. # © 2017 initOS GmbH <https://www.initos.com>
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. import mock
  5. from openerp.tests.common import TransactionCase
  6. class TestBaseMailBcc(TransactionCase):
  7. def test_base_mail_bcc(self):
  8. ir_mail_server = self.env['ir.mail_server']
  9. message = ir_mail_server.build_email(
  10. email_from='admin@example.com',
  11. email_to='admin@example.com',
  12. email_bcc='unused@example.com',
  13. subject='An example E-Mail',
  14. body='With an example body',
  15. )
  16. with mock.patch("smtplib.SMTP"):
  17. ir_mail_server.send_email(message)