devtools/testlib.py
changeset 9363 d773589b6d46
parent 9255 46f41c3e1443
child 9402 2c48c091b6a2
child 9440 6880674c1a26
--- a/devtools/testlib.py	Wed Nov 13 15:58:42 2013 +0100
+++ b/devtools/testlib.py	Tue Jan 07 15:48:31 2014 +0100
@@ -89,7 +89,7 @@
 
 MAILBOX = []
 
-class Email:
+class Email(object):
     """you'll get instances of Email into MAILBOX during tests that trigger
     some notification.
 
@@ -98,7 +98,8 @@
     * `recipients` is a list of email address which are the recipients of this
       message
     """
-    def __init__(self, recipients, msg):
+    def __init__(self, fromaddr, recipients, msg):
+        self.fromaddr = fromaddr
         self.recipients = recipients
         self.msg = msg
 
@@ -125,8 +126,8 @@
         pass
     def close(self):
         pass
-    def sendmail(self, helo_addr, recipients, msg):
-        MAILBOX.append(Email(recipients, msg))
+    def sendmail(self, fromaddr, recipients, msg):
+        MAILBOX.append(Email(fromaddr, recipients, msg))
 
 cwconfig.SMTP = MockSMTP