From 0aa814d923064ce37c7213e466672dbf9e34bce8 Mon Sep 17 00:00:00 2001 From: bwarsaw <> Date: Mon, 31 Mar 2003 23:12:24 +0000 Subject: Update a bunch of tests. --- tests/test_handlers.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'tests') diff --git a/tests/test_handlers.py b/tests/test_handlers.py index 6c5b9a2e..46153e72 100644 --- a/tests/test_handlers.py +++ b/tests/test_handlers.py @@ -708,7 +708,7 @@ From: aperson@dom.ain """, Message.Message) CookHeaders.process(self._mlist, msg, {}) - eq(msg['list-id'], 'A Test List <_xtest.dom.ain>') + eq(msg['list-id'].__unicode__(), 'A Test List <_xtest.dom.ain>') eq(msg['list-help'], '') eq(msg['list-unsubscribe'], ',' @@ -807,8 +807,9 @@ Here is a message. %(spooge)s footer""") def test_multipart(self): + eq = self.ndiffAssertEqual mlist = self._mlist - mlist.msg_header = 'header\n' + mlist.msg_header = 'header' mlist.msg_footer = 'footer' msg1 = email.message_from_string("""\ From: aperson@dom.ain @@ -826,7 +827,7 @@ Here is the second message. msg.attach(msg1) msg.attach(msg2) Decorate.process(self._mlist, msg, {}) - self.assertEqual(msg.as_string(unixfrom=0), """\ + eq(msg.as_string(unixfrom=0), """\ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="BOUNDARY" @@ -837,7 +838,6 @@ Content-Transfer-Encoding: 7bit Content-Disposition: inline header - --BOUNDARY From: aperson@dom.ain @@ -855,7 +855,6 @@ Content-Transfer-Encoding: 7bit Content-Disposition: inline footer - --BOUNDARY--""") def test_image(self): @@ -1611,11 +1610,12 @@ It rocks! eq(len(files), 1) msg2, data = self._sb.dequeue(files[0]) eq(msg.as_string(unixfrom=0), msg2.as_string(unixfrom=0)) - eq(len(data), 5) + eq(len(data), 6) eq(data['foo'], 1) eq(data['bar'], 2) eq(data['version'], 3) eq(data['listname'], '_xtest') + eq(data['verp'], 1) # Clock skew makes this unreliable #self.failUnless(data['received_time'] <= time.time()) @@ -1683,8 +1683,6 @@ def suite(): suite.addTest(unittest.makeSuite(TestMimeDel)) suite.addTest(unittest.makeSuite(TestModerate)) suite.addTest(unittest.makeSuite(TestReplybot)) - suite.addTest(unittest.makeSuite(TestSMTPDirect)) - suite.addTest(unittest.makeSuite(TestSendmail)) suite.addTest(unittest.makeSuite(TestSpamDetect)) suite.addTest(unittest.makeSuite(TestTagger)) suite.addTest(unittest.makeSuite(TestToArchive)) -- cgit v1.2.3