[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[minion-cvs] Add option to pipe outgoing mail through a command inst...



Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.mit.edu:/tmp/cvs-serv10931/lib/mixminion

Modified Files:
	test.py 
Log Message:
Add option to pipe outgoing mail through a command instead of using SMTP

Index: test.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/test.py,v
retrieving revision 1.193
retrieving revision 1.194
diff -u -d -r1.193 -r1.194
--- test.py	13 Apr 2004 04:00:59 -0000	1.193
+++ test.py	19 Apr 2004 03:47:16 -0000	1.194
@@ -5609,10 +5609,9 @@
             fn, args, _ = calls[0]
             self.assertEquals("sendSMTPMessage", fn)
             #server, toList, fromAddr, message
-            self.assertEquals(('nowhere',
-                               ['users@everywhere'],
+            self.assertEquals((['users@everywhere'],
                                'yo.ho.ho@bottle.of.rum'),
-                              args[:3])
+                              args[1:3])
             EXPECTED_SMTP_PACKET = """\
 To: users@everywhere
 From: yo.ho.ho@bottle.of.rum
@@ -5644,10 +5643,9 @@
             fn, args, _ = calls[0]
             self.assertEquals("sendSMTPMessage", fn)
             #server, toList, fromAddr, message
-            self.assertEquals(('nowhere',
-                               ['users@everywhere'],
+            self.assertEquals((['users@everywhere'],
                                'yo.ho.ho@bottle.of.rum'),
-                              args[:3])
+                              args[1:3])
             EXPECTED_SMTP_PACKET = '''\
 To: users@everywhere
 From: "[Anon] Captain Nick" <yo.ho.ho@bottle.of.rum>
@@ -5756,10 +5754,9 @@
             self.assertEquals(1, len(getReplacedFunctionCallLog()))
             fn, args, _ = getReplacedFunctionCallLog()[0]
             self.assertEquals('sendSMTPMessage', fn)
-            self.assertEquals(('foo.bar.baz',
-                               ['mixminion@theotherhost'],
+            self.assertEquals((['mixminion@theotherhost'],
                                'returnaddress@x'),
-                              args[:3])
+                              args[1:3])
             self.assertLongStringEq(MBOX_EXPECTED_MESSAGE, args[3])
         finally:
             undoReplacedAttributes()
@@ -5884,8 +5881,8 @@
             self.assertEquals(1, len(calls))
             fn, args, _ = calls[0]
             self.assertEquals(fn, "sendSMTPMessage")
-            self.assertEquals(("nowhere", ["pirates@sea"],
-                               "yo.ho.ho@bottle.of.rum"), args[:3])
+            self.assertEquals((["pirates@sea"],
+                               "yo.ho.ho@bottle.of.rum"), args[1:3])
             self.assertLongStringEq(args[3], """\
 To: pirates@sea
 From: yo.ho.ho@bottle.of.rum
@@ -7517,7 +7514,7 @@
     loader = unittest.TestLoader()
     tc = loader.loadTestsFromTestCase
 
-    if 1:
+    if 0:
         suite.addTest(tc(MMTPTests))
         return suite
     testClasses = [MiscTests,