Update of /cvsroot/spambayes/spambayes/spambayes/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25987/spambayes/test

Modified Files:
        test_sb_imapfilter.py 
Log Message:
Add another test case - maybe the fetch data has multiple parts, but the 
message numbers
 are the same.

Index: test_sb_imapfilter.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/test/test_sb_imapfilter.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** test_sb_imapfilter.py       17 Dec 2004 00:37:21 -0000      1.7
--- test_sb_imapfilter.py       20 Dec 2004 02:49:06 -0000      1.8
***************
*** 494,497 ****
--- 494,533 ----
          self.assertEqual(data['2']["RFC822.HEADER"], headers)
  
+         # Another complicated one (like the previous, but the two message
+         # numbers are the same).
+         headers = 'Return-Path: <[EMAIL PROTECTED]>\r\n' \
+                   'X-Original-To: [EMAIL PROTECTED]' \
+                   'Delivered-To: [EMAIL PROTECTED]' \
+                   'Received: from cressida (unknown [70.70.206.137])' \
+                   '\r\n\tby mail2.majro.dhs.org (Postfix) with ESMTP' \
+                   'id AAD451CD28E\r\n\tfor <[EMAIL PROTECTED]>; Mo' \
+                   'n,  6 Dec 2004 11:49:41 -0800 (PST)\r\n' \
+                   'From: "Erin Leinbach" <[EMAIL PROTECTED]>\r\n' \
+                   'To: "Dave" <[EMAIL PROTECTED]>\r\n' \
+                   'Subject: Goo goo dolls songs\r\n' \
+                   'Date: Mon, 6 Dec 2004 11:51:07 -0800\r\n' \
+                   'Message-ID: <[EMAIL PROTECTED]' \
+                   'ssida>\r\nMIME-Version: 1.0\r\n' \
+                   'Content-Type: text/plain;\r\n' \
+                   '\tcharset="Windows-1252"\r\n' \
+                   'Content-Transfer-Encoding: 7bit\r\n' \
+                   'X-Priority: 3 (Normal)\r\n' \
+                   'X-MSMail-Priority: Normal\r\n' \
+                   'X-Mailer: Microsoft Outlook, Build 10.0.2616\r\n' \
+                   'Importance: Normal\r\n' \
+                   'X-MimeOLE: Produced By Microsoft MimeOLE V6.00.29' \
+                   '00.2180\r\nX-Spambayes-Classification: ham\r\n' \
+                   'X-Spambayes-MailId: 000001\r\n\r\n'
+         uid = '3086'
+         flags = '(\\Seen \\Deleted)'
+         response = [('5 (UID %s RFC822.HEADER {839}' % (uid,), headers),
+                     ')', '5 (FLAGS %s)' % (flags,)]
+         data = self.imap.extract_fetch_data(response)
+         self.assertEqual(data['5']["message_number"], '5')
+         self.assertEqual(data['5']["FLAGS"], flags)
+         self.assertEqual(data['5']["UID"], uid)
+         self.assertEqual(data['5']["RFC822.HEADER"], headers)
+ 
+ 
  class IMAPMessageTest(BaseIMAPFilterTest):
      def setUp(self):

_______________________________________________
Spambayes-checkins mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/spambayes-checkins

Reply via email to