[Checkins] SVN: zope.sendmail/trunk/src/zope/sendmail/ merging
Baiju M
mbaiju at zeomega.com
Mon Aug 20 03:30:52 EDT 2007
Andreas Jung wrote:
> Log message for revision 79001:
> merging
>
> svn+ssh://svn.zope.org/repos/main/zope.sendmail/branches/ajung-encryption-branch
>
> This branch provides TLS/SSL encryption support.
There are two errors from zope.sendmail, like:
Error in test test_send (zope.sendmail.tests.test_mailer.TestSMTPMailer)
Traceback (most recent call last):
File "/baiju/usr//lib/python2.4/unittest.py", line 260, in run
testMethod()
File
"/home/baiju/wa/zope.sendmail/src/zope/sendmail/tests/test_mailer.py",
line 68, in test_send
self.mailer.send(fromaddr, toaddrs, msgtext)
File "/home/baiju/wa/zope.sendmail/src/zope/sendmail/mailer.py", line
49, in send
code, response = connection.ehlo()
AttributeError: 'SMTP' object has no attribute 'ehlo'
Please modify SMTP mock object to run the test. I just tried to do
this and it's working, please verify it:
Index: src/zope/sendmail/tests/test_mailer.py
===================================================================
--- src/zope/sendmail/tests/test_mailer.py (revision 79010)
+++ src/zope/sendmail/tests/test_mailer.py (working copy)
@@ -29,6 +29,8 @@
class SMTP(object):
+ does_esmtp = True
+
def __init__(myself, h, p):
myself.hostname = h
myself.port = p
@@ -49,6 +51,12 @@
def quit(self):
self.quit = True
+ def ehlo(self):
+ return 250, ""
+
+ def has_extn(self, name):
+ return True
+
if port is None:
self.mailer = SMTPMailer()
else:
Regards,
Baiju M
More information about the Checkins
mailing list