88# but WITHOUT ANY WARRANTY; without even the implied warranty of
99# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1010#
11- # $Id: test_mailgw.py,v 1.7 2002-01-22 11:54:45 rochecompaan Exp $
11+ # $Id: test_mailgw.py,v 1.8 2002-02-04 09:40:21 grubert Exp $
1212
1313import unittest , cStringIO , tempfile , os , shutil , errno , imp , sys
1414
@@ -180,6 +180,57 @@ def testFollowup2(self):
180180This is a second followup
181181
182182
183+ ----------
184+ status: unread -> chatting
185+ ___________________________________________________
186+ "Roundup issue tracker" <[email protected] .> 187+ http://some.useful.url/issue1
188+ ___________________________________________________
189+ ''' , 'Generated message not correct' )
190+
191+ def testMultipartEnc01 (self ):
192+ self .testNewIssue ()
193+ message = cStringIO .StringIO ('''Content-Type: text/plain;
194+ charset="iso-8859-1"
195+ From: mary <mary@test>
196+ 197+ Message-Id: <followup_dummy_id>
198+ In-Reply-To: <dummy_test_message_id>
199+ Subject: [issue1] Testing...
200+ Content-Type: multipart/mixed;
201+ boundary="----_=_NextPart_000_01"
202+
203+ This message is in MIME format. Since your mail reader does not understand
204+ this format, some or all of this message may not be legible.
205+
206+ ------_=_NextPart_000_01
207+ Content-Type: text/plain;
208+ charset="iso-8859-1"
209+ Content-Transfer-Encoding: quoted-printable
210+
211+ A message with first part encoded (encoded oe =F6)
212+
213+ ''' )
214+ handler = self .instance .MailGW (self .instance , self .db )
215+ handler .main (message )
216+ message_data = open (os .environ ['SENDMAILDEBUG' ]).read ()
217+ self .assertEqual (message_data ,
218+ 219+ TO: [email protected] , richard@test 220+ Content-Type: text/plain
221+ Subject: [issue1] Testing...
222+ To: [email protected] , richard@test 223+ 224+ Reply-To: Roundup issue tracker <[email protected] .> 225+ MIME-Version: 1.0
226+ Message-Id: <followup_dummy_id>
227+ In-Reply-To: <dummy_test_message_id>
228+
229+
230+ mary <mary@test> added the comment:
231+
232+ A message with first part encoded (encoded oe ö)
233+
183234----------
184235status: unread -> chatting
185236___________________________________________________
@@ -200,6 +251,9 @@ def suite():
200251
201252#
202253# $Log: not supported by cvs2svn $
254+ # Revision 1.7 2002/01/22 11:54:45 rochecompaan
255+ # Fixed status change in mail gateway.
256+ #
203257# Revision 1.6 2002/01/21 10:05:48 rochecompaan
204258# Feature:
205259# . the mail gateway now responds with an error message when invalid
0 commit comments