Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

src/z/o/zope.sendmail-4.0.0a2/src/zope/sendmail/tests/test_queue.py   zope.sendmail(Download)
 
from zope.sendmail.queue import ConsoleApp
from zope.sendmail.tests.test_delivery import MaildirStub, LoggerStub, \
    BrokenMailerStub, SMTPResponseExceptionMailerStub, MailerStub
 
    def test_error_logging(self):
        self.thread.setMailer(BrokenMailerStub())
        self.filename = os.path.join(self.dir, 'message')
        with open(self.filename, "w+b") as temp:
            temp.write(b'X-Zope-From: foo@example.com\n'