[Checkins] SVN: zope.sendmail/trunk/src/zope/sendmail/tests/test_mailer.py Added some more methods to SMTP mock just make the tests shut up.

Andreas Jung andreas at andreas-jung.com
Mon Aug 20 07:03:14 EDT 2007


Log message for revision 79029:
  Added some more methods to SMTP mock just make the tests shut up.
  
  Note that these tests _can not replace_ tests against a real
  SMTP server.
  
  

Changed:
  U   zope.sendmail/trunk/src/zope/sendmail/tests/test_mailer.py

-=-
Modified: zope.sendmail/trunk/src/zope/sendmail/tests/test_mailer.py
===================================================================
--- zope.sendmail/trunk/src/zope/sendmail/tests/test_mailer.py	2007-08-20 08:43:06 UTC (rev 79028)
+++ zope.sendmail/trunk/src/zope/sendmail/tests/test_mailer.py	2007-08-20 11:03:13 UTC (rev 79029)
@@ -49,6 +49,18 @@
             def quit(self):
                 self.quit = True
 
+            def has_extn(self, ext):
+                return True
+
+            def ehlo(self):
+                return (200, 'Hello, I am your stupid MTA mock')
+
+            def starttls(self):
+                pass
+
+            def does_esmtp(self):
+                return True
+
         if port is None:
             self.mailer = SMTPMailer()
         else:



More information about the Checkins mailing list